Hacker News new | ask | show | jobs
by tashian 510 days ago
It's true, the defaults are quite strict.

As for the "hours" max interval, this is the result of a design decision in Go's time duration library, dealing with the quirks of our calendaring system.

1 comments

This is the api presumably. Not sure about what would prevent days, wasn't familiar with the lore.

https://pkg.go.dev/time#ParseDuration

It's because units up to hours are of a fixed size, but days in most places are only 24h for ~363/365 days of the year, with some being 23h and some being 25h.

(This is ignoring leap seconds, since the trend is to smear those rather than surface them to userspace.)