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))