endlessm / azafea

Service to track device activations and usage metrics
Mozilla Public License 2.0
10 stars 2 forks source link

tests: Stop using future-deprecated datetime.utcnow() #178

Closed wjt closed 3 months ago

wjt commented 1 year ago

https://blog.ganssle.io/articles/2019/11/utcnow.html lays out why this function is bad. In fact I believe the usage in the tests is safe. However Python 3.12 will formally deprecate this function: https://discuss.python.org/t/deprecating-utcnow-and-utcfromtimestamp/26221

Replace it with the recommended (and shorter!) alternative.