Need to strip the getmtime timestamp as some OSes return timestamp with microsecond (XXXX.YYYY)

This commit is contained in:
LecygneNoir 2020-12-15 11:25:32 +01:00
parent 1a937098d8
commit 42ee7d761b

View file

@ -135,8 +135,8 @@ def searchThumbnail(options):
def searchOriginalDate(options):
fileModificationDate = getmtime(options.get('--file'))
return datetime.datetime.fromtimestamp(fileModificationDate).isoformat()
fileModificationDate = str(getmtime(options.get('--file'))).split('.')
return datetime.datetime.fromtimestamp(int(fileModificationDate[0])).isoformat()
# return the nfo as a RawConfigParser object