From 13b18b01dd77a95f70d7a136e3d703444852979d Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 29 Jan 2026 23:27:58 -0500 Subject: [PATCH] Fix date arithmetic in isFeedCacheAvailable --- newsfeed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newsfeed.py b/newsfeed.py index 84f9a3c..c41bffd 100755 --- a/newsfeed.py +++ b/newsfeed.py @@ -249,9 +249,9 @@ class NewsFeed: modifiedTime=os.path.getmtime(pathFileName) convertTime=time.localtime(modifiedTime) formatTime=time.strftime('%d%m%Y %H:%M:%S',convertTime) - fileDateTime=DateTimeHelper.strptime(formatTime,'%d%m%Y %H:%M:%S') + fileDateTime=time.strptime(formatTime,'%d%m%Y %H:%M:%S') currentTime=datetime.now() - timedelta=currentTime-fileDateTime + timedelta=currentTime-datetime(*(fileDateTime[0:6])) hours, hremainder = divmod(timedelta.seconds,3600) minutes, mremainder = divmod(timedelta.seconds,60) self.writeLog('file is = "{age}" hours old'.format(age=hours))