News for hackers. Stuff that matters.
Re:Date is out, Temporal is in by GoblinSlayer on Tuesday January 13, 2026 @12:03PM (#46603862)
If time is stored in UTC, the result is correct even if the timezone database is corrupted, because timezone is only metadata and doesn't affect time.
Re:Date is out, Temporal is in by drysart on Tuesday January 13, 2026 @03:30PM (#46607433)
Depends what you're actually storing. There are plenty of cases where the timezone is not metadata; it defines how the datetime should be interpreted.

For example: your local mom and pop corner store's daily opening and closing times. Storing those in UTC is not correct because mom and pop don't open and close their store based on UTC time. They open and close it based on the local time zone.

Re:Date is out, Temporal is in by ovao on Tuesday January 13, 2026 @04:06PM (#46608008)
Storing them in UTC is valid here also, but their IANA time zone string should also be stored ‘somewhere’.
Re:Date is out, Temporal is in by just6979 on Thursday January 15, 2026 @01:01PM (#46636524)
You don't need to store the timezone anywhere, you just need to know the current local timezone when the stored UTC time is used. And that's why storing in UTC is better, because it only takes one conversion to represent it in some arbitrary local time.

If you stored it as a local time (ie: with TZ), then if it's ever later translated to a different local time (different TZ), you're now dealing with all the quirks of 2 different timezones. It's great way to be off by some multiple of 15 minutes, or even a day or two!

Heck, even if it's the same exact location, storing in local time can still require conversion if that location uses daylight savings! You're never safe from needing to adapt to timezones, so storing datetimes in the most universal format is pretty much always the best thing to do.

Re:Date is out, Temporal is in by GoblinSlayer on Tuesday January 13, 2026 @05:10PM (#46609003)
You conflate different concepts here. The actual moment of opening and closing can be stored in UTC, because it's proper time. Scheduling algorithm is an algorithm, not time. You can use DSL similar to time to code this algorithm, but being DSL it can go only so far to implement it.