WIP: Replace datetime.utcnow() with datetime.now(timezone.utc)
Description
Currently, it is not recommended to use datetime.utcnow()
since it is not timezone aware: https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow. The timestamps are stored as timezone unaware objects in postgres, and consequently can be treated as local time in our operations. This mr replaces usage of utcnow, with datetime.now(timezone.utc)
, which is timezone aware.
Edited by Richard Kennedy