327
submitted 5 months ago by yogthos@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] jsomae@lemmy.ml 5 points 5 months ago

What does tz_database do? Wikipedia makes it seem like it basically converts a pair (geocoordinatr, utc time) to local time

[-] InputZero@lemmy.ml 7 points 5 months ago

From my very basic understanding, yeah that's basically what it does. However it accounts for a whole lot more into adding or subtracting from UTC. Timezones aren't absolute, they're political. Timezones have weird rules, and history that needs to be somehow expressed in the code to get the right time. That's what's sets tz_database apart from just looking at a map and saying it's +7 UTC.

[-] jsomae@lemmy.ml 3 points 5 months ago

So it updates now and then with new rules, and it keeps historical rules for past dates?

[-] InputZero@lemmy.ml 2 points 5 months ago

I think so. Like I said, I have a very basic understanding of it. There are definitely a lot of people who know more about this than I do.

this post was submitted on 12 Apr 2024
327 points (97.1% liked)

Programmer Humor

32067 readers
805 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS