mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
tau: due time always be in future
This commit is contained in:
@@ -152,6 +152,8 @@ def convert_attr_val(attr, val):
|
||||
year = int(date.strftime("%Y"))%100
|
||||
try:
|
||||
dt = datetime.strptime(f"18:00 {val}{year}", "%H:%M %d%m%y")
|
||||
if dt.date() < date:
|
||||
dt = datetime.strptime(f"18:00 {val}{year+1}", "%H:%M %d%m%y")
|
||||
except ValueError:
|
||||
print(f"error: unknown date format {val}")
|
||||
sys.exit(-1)
|
||||
|
||||
Reference in New Issue
Block a user