News for hackers. Stuff that matters.
Re:Ten Python datetime pitfalls, and what libraries are (not... by falserum on Sunday February 18, 2024 @10:46AM (#39419986)
1. Contract says that goods must be delivered at 4pm.

2. Government suddenly changes the law and moves the offset of whole country.

3. Contract is still valid, goods have to be delivered still at 4pm, but with new offset (so at different utc time).

(I guess timezoned time would still be better than local time, but UTC would not work here)

Re:Ten Python datetime pitfalls, and what libraries are (not... by amluto on Sunday February 18, 2024 @10:52AM (#39420038)
> (I guess timezoned time would still be better than local time, but UTC would not work here)

Exactly.

Re:Ten Python datetime pitfalls, and what libraries are (not... by mharig on Tuesday February 20, 2024 @08:55AM (#39441278)
1. Contract says that goods must be delivered at 4pm UTC

Problem solved, unless the government changes the law too little before 4pm UTC. But handling this case in software is impractical.