You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 31 places we are calling the since python 3.12 deprecated datetime.utcnow() function:
$ rg --no-filename utcnow | wc -l
31
While we are at it we should possibly consider if there are other issues related to our use of non-timezone aware functions. For example the clickhouse tables are not specified with the UTC timezone so they will have the timezone set of wherever the machine is run on.
Which is OK since we run all our backend infrastructure on machines that use the UTC timezone, but if that ever changes (maybe because we use some cloud or we are running the code on our laptop) this is going to be a very confusing bug to investigate.
To make things even more annoying, the clickhouse driver we use doesn't work with timezones properly: mymarilyn/clickhouse-driver#388, so we can't easily just switch to using timezone aware functions.
Anyways this issue it to remember about it and think about it when we decide to pick up some refactoring of backend.
The text was updated successfully, but these errors were encountered:
As far as I understand it, we are currently not using timezone aware datetime objects in all of the backend code.
Python 3.12 has deprecated the utcnow() function and it's going to be removed in future versions: https://blog.miguelgrinberg.com/post/it-s-time-for-a-change-datetime-utcnow-is-now-deprecated.
In 31 places we are calling the since python 3.12 deprecated datetime.utcnow() function:
While we are at it we should possibly consider if there are other issues related to our use of non-timezone aware functions. For example the clickhouse tables are not specified with the
UTC
timezone so they will have the timezone set of wherever the machine is run on.Which is OK since we run all our backend infrastructure on machines that use the UTC timezone, but if that ever changes (maybe because we use some cloud or we are running the code on our laptop) this is going to be a very confusing bug to investigate.
To make things even more annoying, the clickhouse driver we use doesn't work with timezones properly: mymarilyn/clickhouse-driver#388, so we can't easily just switch to using timezone aware functions.
Anyways this issue it to remember about it and think about it when we decide to pick up some refactoring of backend.
The text was updated successfully, but these errors were encountered: