Finally got around to dealing with one of those "DeprecationWarning: datetime.datetime.utcnow() is deprecated" warnings, so I wrote it up as a tiny TIL:https://til.simonwillison.net/python/utc-warning-fix
@simon I have been using using zoneinfo.ZoneInfo for python v3.9+ (else, pytz.timezone, specifically for v3.6).
I take it if I am not doing any time zone conversions & only using UTC date-time, then zoneinfo is not needed (not to mention an extra import)?
#Python
@anubhav yeah as far as I can tell you don't need an extra packages for UTC from 3.9 onwards (and maybe earlier)
@simon @anubhav The UTC object was added in 3.2 I believe.
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.