Timezones#182
Merged
Merged
Conversation
Contributor
Contributor
Other places have one package per line to make it easier to add and remove packages without encountering merge conflicts.
Add a new configuration variable to .env (that can be overriden per deployment like the others) to specify the timezone for the class instance. This will make the times and dates in the logs and the output of orbit display in local time instead of UTC which is more user friendly.
The function is deprecated and shold not be used: ``` $ python3 -c 'import datetime; datetime.datetime.utcnow()' <string>:1: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). ``` We can rely on Max-Age to be sufficient for expiring the cookies, any user agents that are too old to support it can simply have the cookie not expire which isn't a huge deal, since their expiration is obviously checked server side.
By converting the python datetime objects to timezone aware ones with the `.astimezone()` function, the isoformat function will include the UTC offset.
4c94de0 to
f9bfe74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Make containers timezone aware to provide user friendly dates/timestamps in local time.
There is a global timezone per instance that defaults to eastern time in
.env, but can be overridden using an environment variable like the hostname/version/deployment.