this post was submitted on 01 Mar 2024
137 points (98.6% liked)
Rust
6075 readers
10 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Obligatory Tom Scott's video :D https://youtu.be/-5wpm-gesOY
Even just sticking with UNIX timestamps and relying on a library, dealing with time zones still sucks. Inevitably, your backend and frontend libraries will have some difference in some case that matters for some customer. And it won't happen just after release, but some months down the road when one country somewhere changes their laws and your libraries don't get updated in time, or maybe there's a bug like in the OP.
Madness lies everywhere when talking about time.
We should all do ourselves a favor and follow UTC time everywhere. There's still leap seconds and leap days to deal with, but so many problems just disappear if everyone uses the same time. The sun may come up at 20:00 and go down at 09:00, but your stores can just adjust their hours and it's totally fine. You won't ever have to worry about missing a meeting because the organizer's software and yours got out of sync, and you'll never have to mentally convert times on a call.
It's a small price to pay, but for all our sanity, just use UTC time.
Why should we keep leap seconds? Let noon drift by 1 minute per century (or whatever).