Skip to content

Conversation

@Kami
Copy link
Contributor

@Kami Kami commented Feb 13, 2020

This pull request adds new US_TZ_AWARE_DATES setting, which when set True, updates the Github provider code to support timezone aware datetime objects.

For backward compatibility reasons, it defaults to False.

Background

Currently, if you use Github provider and have USE_TZ config option set to True, incorrect dates will be displayed in the CodeSpeed dashboard.

The reason for that is that currently the Github provider code strips time zone info and makes datetime objects naive (aka not timezone aware). This means that datetime objects in the database carry no timezone info so all the timezone aware template functions will return invalid date.

This basically means that right now you can only use USE_TZ=False and UTC dates everywhere with the Github provider.

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.

2 participants