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 @simon Generally I recommend using `datetime.timezone.utc` for the UTC object, though there's usually also a UTC object in `zoneinfo`.
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.