Closed jose1711 closed 9 months ago
An issue I have with this implementation is that it produced this error because I had /etc/timezones listing some America/NewYork timezone (selected at install), while globally TZ was set to my actual timezone. So there is a conflict and get_timezone()
returned zoneinfo.ZoneInfoNotFoundError
. I can imagine this non-obvious issue might occur to many people.
We could try to except this error, but then my timezone is not taken into account and everything is in UTC.
I could get a better result with a slightly different implementation: e2d10b6a95895b53f68ccb422eedf26ea670641e
Wow, 1 line instead of 25, that's elegant!