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

Migrate away from datetime.utctime() & make server more timezone aware #794

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

bennybp
Copy link
Contributor

@bennybp bennybp commented Nov 28, 2023

Description

datetime.utctime() is being deprecated in python 3.12. This migrates to using fully timezone-aware TIMESTAMP columns in postgres, as well as a function for generating UTC datetime objects that are timezone aware.

The DB still stores the timestamps internally as UTC times, but now the resulting datetime objects in the ORM will contain the timezone. This will also make interfacing with the client easier (ie, querying records based on times should work better if the user specifies a timezone)

Changelog description

Migrate away from datetime.utctime() & make server more timezone aware

Status

  • Code base linted
  • Ready to go

@bennybp bennybp merged commit 63ace1b into main Nov 28, 2023
17 checks passed
@bennybp bennybp deleted the utctime branch November 28, 2023 16:25
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.

1 participant