Skip to content

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

Merged
bennybp merged 3 commits intomainfrom
utctime
Nov 28, 2023
Merged

Migrate away from datetime.utctime() & make server more timezone aware#794
bennybp merged 3 commits intomainfrom
utctime

Conversation

@bennybp
Copy link
Copy Markdown
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
@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