Join Nostr
2026-02-20 19:25:13 UTC

Akkana Peck on Nostr: In datetime hell again. I just hate #Python's datetime SO much. Any given datetime ...

In datetime hell again. I just hate #Python's datetime SO much. Any given datetime object might or might not have a timezone. Any given function might or might not return a timezone-aware datetime. If you ever mess up and call a function that returns a timezone when you didn't expect one, or vice versa, or a function you call changes in that respect, now you have a hidden time bomb that will crash your program the next time you do a comparison with or subtraction from another datetime.