[due-eod] Fix checking for 00:00:00.

This commit is contained in:
Stanislav Nikitin 2022-07-28 16:23:03 +05:00
parent 0cc9f8e6c0
commit 76378e90f9
Signed by: pztrn
GPG Key ID: 1E944A0F0568B550
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ task_data = json.loads(task_data_raw)
if "due" in task_data:
new_due_ts = datetime.datetime.strptime(task_data["due"], "%Y%m%dT%H%M%S%z").astimezone()
if new_due_ts.hour != 00 and new_due_ts.minute != 00 and new_due_ts.second != 00:
if new_due_ts.hour == 00 and new_due_ts.minute == 00 and new_due_ts.second == 00:
new_due_ts = new_due_ts.replace(hour = 23, minute = 59, second = 59)
task_data["due"] = new_due_ts.astimezone(tz = datetime.timezone.utc).strftime("%Y%m%dT%H%M%SZ")