Hacker News new | ask | show | jobs
by rich_sasha 314 days ago
The article clearly aims to be inflammatory, but I'd restate: dates and times are not the same. Ditto for time intervals etc. But lots of libraries skim over this, leading to terrible bugs.

Python date time library, for example, essentially has dates as low precision timestamps. If you subtract a second from a time at midnight, you get what you expect. But subtract it from a date and you are where you started.

You can't add 24hrs to a midnight timestamp to increment date by 1 because DST.

Etc etc.