this post was submitted on 29 Jun 2024
880 points (94.9% liked)

Programmer Humor

31329 readers
14 users here now

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

Rules:

founded 4 years ago
MODERATORS
 
(page 2) 50 comments
sorted by: hot top controversial new old

Worst is when someone fucked up the DB time configs at some point and you have datetimes in a column that fall during the “nonexistent” hour in which clocks skip ahead for DST, and you have to figure out what the fuck actually happened there, and where in the data pipeline tz data was either added or stripped (sometimes it’s both, and sometimes it’s not just once), and undo the timestamp fuckery.

Source: did that this week. Was not super awesome.

[–] uis@lemm.ee 7 points 2 weeks ago

Worst is UTC vs IAT

[–] nothacking@discuss.tchncs.de 7 points 2 weeks ago

Na let's keep timezones, there useful for humans who generally want time to mean something, but lets ditch daylight savings time, all it does is make scheduling a massive pain twice a year, and messes up everyone's sleep cycle. Without it, timezones would just be a fixed offset from another, minimizing trouble.

[–] alexc@lemmy.world 6 points 2 weeks ago (7 children)

I don’t know what the hate is unless you are trying to store time as a String property. There a special place in hell for all developers who do this.

IMHO, all you really need to know is an Epoch time stamp and whether it’s localized to the viewer or the creator… Not that complex. The problem with time zones is that politicians keep changing them

Honestly, I’d rather give the creator of NULL a slap.

load more comments (7 replies)
[–] cyborganism@lemmy.ca 6 points 2 weeks ago

Holy shit! Yes!!!! Having worked with time sensitive data, it's such bullshit.

[–] MystikIncarnate@lemmy.ca 6 points 2 weeks ago (3 children)

IMO, the biggest problem with timezones is that the people who initially created them were fairly short sighted.

That and there have been way too many changes to who lives in what timezone. The one that boggles my mind is that apparently there's a country in two timezones, not like, split down the middle or anything, but two active timezones across the entire country depending on which culture you're a part of, or something. It's wild.

I still don't know if there's any difference between GMT and UTC. I couldn't find one. They both have the same time, same offset (+0), and represent the same time zone area.

I use UTC because I'm in tech, and I can't stand time formats, so I exclusively use ISO 8601, with a 24 hour clock. Usually in my local time zone, via UTC. We have DST here which I'm not a fan of, but I have to abide by because everyone else does.

My biggest issues with time and timezones is that everyone uses different standards. It drives me nuts when software doesn't let me set the standard for how the time and date is displayed, and doesn't follow the system settings. It's more common in web apps, but it happens a lot. I put in a lot of effort to try to get everything displaying in a standard format then some crudely written website is just mm/dd/yy with 12h clock and no timezone info, and there's nothing you can do about it.

[–] davidagain@lemmy.world 7 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

UTC exists as a historical compromise because the British felt that GMT was the bees knees and the French felt differently. The letter order is most definitely a compromise between French and English word order. You can call it Universal Time Coordinaire.

Historically, GMT became the international time reference point because the Greenwich observatory used to be the leader in the field of accurately measuring time. It probably helped that the British navy had been dominant earlier and lots of countries around the world and across time zones had been colonised by the British.

UTC is an international standard for measuring time, based on both satellite data about the position and orientation of the earth and atomic clocks, whereas GMT is a time zone. Nowadays, GMT is based on UTC not independent telescopic observation.

What's the difference? You can think of a time zone as an offset from UTC, in the same sense that a 24h clock time is an offset from midnight. GMT = UTC+0.

Technically, UTC isn't a valid time zone any more than "midnight" is a valid 24h clock time. UTC+0 is a time zone and UTC isn't in a similar sense that 00:00 is a time in 24hr clock and "midnight" isn't.

Of course, and perfectly naturally, I can use midnight and 00:00 interchangeably and everyone will understand, and I can use UTC and UTC+0 interchangeably and few people care, but GMT = UTC+0 feels like the +0 is doing nothing to most eyes.

Fun fact: satellite data is very accurate and can track the UTC meridian independently from the tectonic plate on which the Greenwich observatory stands. The UTC meridian will drift slowly across England as the plates shift. Also, the place in the stars that Greenwich was measuring was of by a bit, because they couldn't have accounted for the effect of the terrain on the gravitational field, so the UTC meridian was placed several tens of metres (over 200') away from the Greenwich prime meridian. I suspect that there was a lot more international politics than measurement in that decision, and also in making the technical distinction between UTC and GMT, but I'm British, so you should take that with a pinch of salt.

load more comments (1 replies)
load more comments (2 replies)
[–] cupcakezealot@lemmy.blahaj.zone 5 points 2 weeks ago

stardate superiority

[–] Sam_Bass@lemmy.world 4 points 2 weeks ago
load more comments
view more: ‹ prev next ›