Skip to content

Conversation

@tichkadzinga
Copy link

fixes #230

Comment on lines +50 to +53
value = datetime.datetime.strptime(
value.replace('Z', 'UTC'),
'%Y-%m-%dT%H:%M:%S.%f%Z'
).replace(tzinfo=datetime.timezone.utc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
value = datetime.datetime.strptime(
value.replace('Z', 'UTC'),
'%Y-%m-%dT%H:%M:%S.%f%Z'
).replace(tzinfo=datetime.timezone.utc)
ts = value.replace('Z', '+0000')
value = datetime.datetime.strptime(ts, '%Y-%m-%dT%H:%M:%S.%f%z')

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.

Datetime is not timezone aware

4 participants