MolSSI / QCFractal

A distributed compute and database platform for quantum chemistry.
https://molssi.github.io/QCFractal/
BSD 3-Clause "New" or "Revised" License
143 stars 47 forks source link

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

Closed bennybp closed 7 months ago

bennybp commented 7 months ago

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