From 88bccabfe4a72efdaaef0720d03dbafabbdd15cd Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Tue, 26 Apr 2022 11:06:53 -0300 Subject: [PATCH] Fix non-UTC time --- mailman.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailman.py b/mailman.py index 606dbcd..2226b17 100755 --- a/mailman.py +++ b/mailman.py @@ -21,7 +21,7 @@ for mail in Path('scheduled').glob('*.mail'): scheduled = re.findall(r'Scheduled to \(UTC\): (.*)\n', msg)[0] scheduled = datetime.fromisoformat(scheduled) - if scheduled <= datetime.now(): + if scheduled <= datetime.utcnow(): to_address = re.findall(r'To: (.*)\n', msg)[0] subject = re.findall(r'Subject: (.*)\n', msg)[0]