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

Fix datetime export format #3

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

Fix datetime export format #3

wants to merge 3 commits into from

Conversation

silviot
Copy link

@silviot silviot commented Jun 27, 2013

Without these changes I was getting one hour early times.

@silviot
Copy link
Author

silviot commented Oct 4, 2013

Updated with no pytz dependencies

return date.replace(tzinfo=UTC)


class UTC(datetime.tzinfo):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Why not just use the built-in datetime.timezone.utc?

from datetime import timezone
UTC = timezone.utc

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I was using python 2.7 at the time.
Should I fix this? Seven years with no activity sound like no one is particularly interested.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry, I noticed that after reviewing this. 🤦‍♂️ 😂

BTW, I looked into this myself, and all of the timestamps used in fittotcx (lap start, activity ID, and GPS timestamp) are already in UTC… so I wonder how an offset can get in there.

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

Successfully merging this pull request may close these issues.

3 participants