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 timezone parse for non-UTC timezone #96

Merged
merged 1 commit into from
Apr 30, 2023

Conversation

kebe7jun
Copy link
Contributor

@kebe7jun kebe7jun commented Apr 24, 2023

Fix #95

>>> datetime.datetime.strptime('2017-12-05T15:00:24.972+08:00', '%Y-%m-%dT%H:%M:%S.%f%z')
datetime.datetime(2017, 12, 5, 15, 0, 24, 972000, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800)))
>>> datetime.datetime.strptime('2017-12-05T15:00:24.972Z', '%Y-%m-%dT%H:%M:%S.%f%z')
datetime.datetime(2017, 12, 5, 15, 0, 24, 972000, tzinfo=datetime.timezone.utc)

@yuvalsteuer yuvalsteuer merged commit a7e3423 into GerevAI:main Apr 30, 2023
@kebe7jun kebe7jun deleted the fix/time-format branch May 1, 2023 00:23
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.

ValueError: time data '2017-12-05T15:00:24.972+08:00' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'
2 participants