Hacker News new | ask | show | jobs
by normie3000 395 days ago
> it needed to add a time (midnight, that's sane)

Is it sane? Is midnight at the start of a day, or the end of it? I'd think noon would be less ambiguous, and significantly less prone to these timezone issues (although this may not be a benefit).

2 comments

Indeed it is not sane. Languages should provide a separate Day type to operate on dates without times. Forcing everything to use dates with times and timezones causes bugs in applications that don't need times.
ISO 8601-1:2019/Amd 1:2022

Midnight at the start of the day: 00:00:00

Midnight at the end of the day: 24:00:00