1
0
mirror of https://github.com/oskar456/dzonegit.git synced 2024-05-11 05:55:41 +00:00

Add note to my future self

This commit is contained in:
Ondřej Caletka
2018-07-09 13:31:29 +02:00
parent 1309e9275d
commit e3dc0dd0fa

View File

@@ -107,6 +107,8 @@ def get_increased_serial(old):
old = int(old)
now = int(time.time())
todayserial = int(datetime.date.today().strftime("%Y%m%d00"))
# Note to my future self: This is expected to break on 2034-06-16
# as unix timestamp will become in the same range as YYMMDDnn serial
if 1e9 < old < now:
# Serial is unix timestamp
return str(now)