this post was submitted on 03 Apr 2024
1104 points (96.2% liked)
Programmer Humor
19813 readers
154 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
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
The only code with timezones should be the bit squishy meat bags touch. Everything's is should be UNIX time. Or it you are unfortunate enough to be on Windows, NT time.
Some unfortunate programmers already have to deal with the speed of time not being a constant. In a distant future, timestamps might always have a universal position (and speed), and is that much different from timezones?
Or we find some way of removing time distortion of physics. Find the universe's real systick. ๐
No UTC. Convert/use UTC on the way in and covert to local time for the user or local time of the noun the date is for in the display.
Any UTC type is going to do native time and convert for display.
But with native time directly, you can just an int64 with loads of space for fine resolution via multiplication.
Storing time broken up into separate units is crazy.