From 37fa7fe8a8fa877e154ef775bc846c462f1f8d22 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 28 Nov 2023 19:07:50 -0500 Subject: [PATCH] Fix date parsing for release check Fixes an issue with date parsing for update check --- pialert/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pialert/helper.py b/pialert/helper.py index e98d5a24..5966bde8 100755 --- a/pialert/helper.py +++ b/pialert/helper.py @@ -709,9 +709,9 @@ def checkNewVersion(): dateTimeStr = data[0]["published_at"] - realeaseTimestamp = int(datetime.datetime.strptime(dateTimeStr, '%Y-%m-%dT%H:%M:%SZ').strftime('%s')) + releaseTimestamp = int(datetime.datetime.strptime(dateTimeStr, '%Y-%m-%dT%H:%M:%S%z').timestamp()) - if realeaseTimestamp > buildTimestamp + 600: + if releaseTimestamp > buildTimestamp + 600: mylog('none', ["[Version check] New version of the container available!"]) newVersion = True else: