elodie icon indicating copy to clipboard operation
elodie copied to clipboard

Set file modification time according to UTC

Open mathiasvr opened this issue 6 years ago • 2 comments

Since the date_taken metadata is UTC, we can use calendar.timegm to update the file modification time according to the local timezone.

Currently, mktime is used which assumes a local datetime. This is not the case, and because DST flag is always set to 0, the time offset is not even consistent.

mathiasvr avatar Jul 27 '19 10:07 mathiasvr

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 27 '19 10:07 CLAassistant

Thanks for this PR.

I'm not sure I understand how this interacts with #310 which attempts to utilize location data to determine the proper time zone. Feel free to describe that else I'll try and get to it myself once I have some time.

jmathai avatar Jul 29 '19 07:07 jmathai