Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set file modification time according to UTC #332

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mathiasvr
Copy link

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.

@CLAassistant
Copy link

CLAassistant commented Jul 27, 2019

CLA assistant check
All committers have signed the CLA.

The return type should be `struct_time`
@jmathai
Copy link
Owner

jmathai commented Jul 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants