this post was submitted on 17 Apr 2024
1444 points (98.6% liked)
Programmer Humor
19589 readers
412 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
We've gone too far. Everyone just switch to UTC please. Yes, it means some will go to bed at 2pm and get up at 10pm, so what.
I'm just saying, but we did.
Pretty much every electronic thing you own that resembles a computer (phones, tablets, laptops, desktops, even your damned TV) uses UTC. Every. Single. One. Translates that time to "local" whenever it needs to.
So when your TV goes from 9:32 to 9:33, is just showing the converted time from UTC each time.
Almost every device on the planet is keeping time in UTC.
Just because you don't see UTC time on your device, doesn't mean that's not what's happening. I had an issue where I needed to get into my computer's bios for something, as soon as the BIOS loaded and showed the time, it was "wrong" because it was in UTC. I'm sure plenty of newer BIOS dialogs are configured to account for timezones now, so yeah. I might be unique in this. It's still there.
Almost all computers count time as seconds from the epoch (midnight 1/1/1970). That then gets converted into a readable time, which may go through UTC to be converted first, but that's not how it's storing it.
Unix time is far less universal in computing than you might hope. A few exceptions I'm aware of:
Converting between time formats is a common source of bugs and each one will overflow in different ways. A time value might overflow in the year 2036, 2038, 2070, 2100, 2156, or 9999.
Also, Unix time is often managed with a separate nanoseconds component for increased resolution. Like in C
struct timespec
, modern *nix filesystems like ext4/xfs/btrfs/zfs, etc.