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

Programmer Humor

31249 readers
898 users here now

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

Rules:

founded 4 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] nothacking@discuss.tchncs.de 7 points 5 days 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.

[–] ChaoticEntropy@feddit.uk 10 points 6 days ago* (last edited 6 days ago)

The notifications in one of our systems is aligned with UTC because it needs to be for a whole bunch of background services to function. Periodically (every couple of years) someone raises a ticket to complain that the time of their notifications is an hour out, and the 2nd line support worker will think "well that's easy, I'll just change the server time to BST". This then brings this whole suite of applications to a crashing halt as everything fails.

[–] Sam_Bass@lemmy.world 4 points 6 days ago
[–] Truck_kun@beehaw.org 3 points 6 days ago* (last edited 6 days ago) (1 children)

OMG, I'm dealing with a developer right now that is dealing with patient collected samples in several timezones, allowing the patients to either enter the time they collected, or use current time, and storing it in UTC time.

We do not receive any timezone data, patient collection data is showing different days than the patient could write on their samples depending on the time of day, and the developer said 'just subtract X hours' (our timezone).... for which not all patients would live in.

I suppose I could, if they'd provide the patient's timezone, but they don't even collect that. Can you just admit your solution is bad? It's fine to store a timestamp in UTC, but not user provided data... don't expect average users to calculate their time (and date) in UTC please.

[–] MrScruff@lemmy.ml 2 points 6 days ago (1 children)

Depends on what's collecting the information. If it's a website, then the client-side code could most certainly normalize everything to UTC based on the browsers time zone before submitting. That's what I would probably do, if the user's time zone isn't needed or wanted..

[–] SpaceCowboy@lemmy.ca 2 points 6 days ago

This is actually the best approach.

Obviously they are getting timezone information otherwise the app could only display whatever time the user entered in.

If you want to sort things by the actual time, it's simple and performant if all of the times are in the same timezone, and UTC would be the standard one to use. Pushing the timezone calculations to the client makes sense because the UTC time is correct, it's just a matter of displaying it in a user friendly way, ie. show the time in the user's timezone.

[–] TootSweet@lemmy.world 141 points 1 week ago* (last edited 1 week ago) (17 children)

The creator of DST gets the first slap. Then the timezones asshole.

I'm planning to do a presentation at work on how to deal with dates/times/timezones/conversion/etc in the next few weeks some time. I figure it would be a good topic to cover. I'm going to start my talk by saying "first, imagine there is no such thing as timezones or DST." And then build on that.

[–] dgmib@lemmy.world 83 points 1 week ago (2 children)

Sandford Fleming (the guy who invented time zones) actually made it easier.

Before timezones, every town had their own clock that defined the time for their town and was loosely set such that “noon is when the sun is at its highest point in the sky.” Which couldn’t be measured all that accurately.

If it wasn’t for Fleming, we’d be dealing with every city or town having a separate time zone.

[–] HeyThisIsntTheYMCA@lemmy.world 28 points 1 week ago (5 children)

Save a slap for the dude who invented sundials, and another slap for the dude who invented civilization.

load more comments (5 replies)
load more comments (1 replies)
[–] Sanctus@lemmy.world 33 points 1 week ago (2 children)

Imagine, if we were just all on the same time. It'd just make things, a little easier.

[–] imPastaSyndrome@lemm.ee 62 points 1 week ago* (last edited 1 week ago) (2 children)

All in the same time? But... Then the sun might go down at noon. That doesn't make sense...

Wait... Noon? Noooon...

The word noon comes from a Latin root, nona hora, or "ninth hour." In medieval times, noon fell at three PM, nine hours after a monk's traditional rising hour of six o'clock in the morning. Over time, as noon came to be synonymous in English with midday, its timing changed to twelve PM.

Oh now that's worse

load more comments (2 replies)
load more comments (1 replies)
load more comments (15 replies)
[–] BigMikeInAustin@lemmy.world 68 points 1 week ago (14 children)

It's pretty simple, actually. A village somewhere in Europe that is completely in the shade all day for part of the year has already proven it.

Mirrors.

We just need a ring of motorized mirrors around the Earth.

At hour 0, the mirrors will rotate to show sun all across the entire Earth.

At hour 12, the mirrors will rotate to put all of the Earth into night time.

That lets the entire Earth have the exact same synchronized time synchronized with the daylight.

The mirrors will block the sun from parts of the earth facing during the night.

The mirrors will constantly be rotating to keep the proper amount of sun light facing each part of Earth as the Earth rotates.

The mirrors will be solar powered.

This will fix it, right?

[–] SVcross@lemmy.world 41 points 1 week ago

I don't see any way whatsoever that could mean this project is not viable.

[–] AnarchistArtificer@slrpnk.net 28 points 1 week ago

Now I'm thinking about an ex-programmer supervillain who does this as her big foray into supervillainy

load more comments (12 replies)
[–] randint@lemmy.frozeninferno.xyz 61 points 1 week ago (5 children)

obligatory: https://qntm.org/abolish

Before I read this article, I also thought it would be a great idea to get rid of timezones entirely and just use UTC for everything. To quote from the link, (please forgive me for being lazy and not formatting it correctly)

Abolishing time zones brings many benefits, I hope. It also:

  • causes the question "What time is it there?" to be useless/unanswerable
  • necessitates significant changes to the way in which normal people talk about time
  • convolutes timetables, where present
  • means "days" (of the week) are no longer the same as "days"
  • complicates both secular and religious law
  • is a staggering inconvenience for a minimum of five billion people
  • makes it near-impossible to reason about time in other parts of the world
  • does not mean everybody gets up at the same time, goes to work at the same time, or goes to bed at the same time
  • is not simpler.

As long as humans live in more than one part of the world, solar time is always going to be subjective. Abolishing time zones only exacerbates this problem.

[–] JayDee@lemmy.ml 7 points 6 days ago (1 children)

Eh, I think the article blows the situation out of proportion. Overall you're still in the same situation as before. Instead you would just be looking up a timetable of sunrises/sunsets, instead of a timezone chart. It ends up mostly reframing the question from "what time is it there?" to "what time of day is it there?". The real version of "after abolishing time zones" is "google tells me it is before sunrise there. It's probably best not to call right now."

I've been using UTC on my own clocks without issue, and the change is not some completely reality-breaking thing - not anymore than DST. From a matter of personal perspective it just shifts what time correlates to what time of day.

using UTC also simplifies the questions "what times can I call you at?" And "when should we have our call?" since you have the same temporal standard. Even before that, I was scheduling calls with family by stating the call would be at such-and-such time UTC.

The biggest difference is with when the date changes, and I think that ultimately is the hardest pill to swallow, and that's even compared to stomaching the sun rising at 2 AM. Having it change from June 5th to June 6th in the middle of a workweek, or even jumping to another month would bother alot of folks in a significant fashion.

Ultimately it's just a personal practice. No nation is going to abolish time zones if everyone still uses time zones. I just prefer it for various reasons.

[–] Midnight1938@reddthat.com 1 points 6 days ago* (last edited 6 days ago) (1 children)

If you want your sunrise to be at 12am, go ahead.

If you really want to fix something. Fix months

[–] JayDee@lemmy.ml 2 points 6 days ago* (last edited 6 days ago) (1 children)

Between the two, months is much harder. With time, you just set your clocks to UTC. To get months fixed you need mass adoption, rewriting calendar software, etc.

[–] Midnight1938@reddthat.com 2 points 6 days ago (1 children)

Bold of you to assume people will agree to having sunrises at 9am while some other country gets the privilege of getting it at the usual 6

[–] JayDee@lemmy.ml 1 points 6 days ago* (last edited 6 days ago)

You're upset that it's sunrise at 06:00 somewhere and not that some other lucky bastard landed sunrise at 00:00?

(that might actually happen over the ocean, I have not checked)

[–] SpaceCowboy@lemmy.ca 5 points 6 days ago

Yeah it's just being angry about the fact that the Earth is rotating ball. Wanting to abolish timezones is different from Flat Earth only be degrees.

Sure the "what time is it there?" question goes away, but it's replaced by "what are your business hours?"

Ultimately it will be daytime in one part of the world while it's night in another part of the world. That will always cause problems.

load more comments (3 replies)
[–] dannoffs@lemmy.sdf.org 60 points 1 week ago (1 children)

You know the system before timezones was way worse, right? Every town had their own time.

[–] Crisps@lemmy.world 22 points 1 week ago

That problem happened because there was no way to travel from town to town quickly so if the clocks were off nobody cared. The trains changed that.

[–] savvywolf@pawb.social 57 points 1 week ago (4 children)

I used to think this way, then it was pointed out to me that, without timezones, we'd be in a situation where Saturday starts mid-workday in some places.

[–] bassomitron@lemmy.world 44 points 1 week ago (19 children)

Yeah, timezones are absolutely helpful from a logistics and coordination standpoint. Daylight savings time, though... That nonsense needs to be eliminated. So what if it will be dark well into morning wake hours in the winter, I'd take it over dealing with the time change twice a year.

load more comments (19 replies)
load more comments (3 replies)
[–] tibi@lemmy.world 38 points 1 week ago* (last edited 1 week ago) (1 children)

It could have been worse. The romans had the day divided into 24 hours, like we do, but the hours varied in length so that from sunrise to sunset, you would always have 12 hours.

Imagine if that was the agreed upon time system, and we had to program that into computers.

load more comments (1 replies)
[–] KillingTimeItself@lemmy.dbzer0.com 33 points 1 week ago (6 children)

fr i keep saying this and nobody seems to think it's a good idea.

Fuck timezones, me and my homies operate on UTC.

[–] uis@lemm.ee 38 points 1 week ago (7 children)

UTC is timezone too. It has leap seconds. IAT is atomic time. It is perfect.

I'd fuck with atomic time, but at that point i want a perfect calendar system also.

[–] JayDee@lemmy.ml 0 points 6 days ago (1 children)

UTC has leap seconds to keep it aligned with earth's rotation. Otherwise all timezones would slowly shift away from having any correlation with solar time. Between UTC and IAT, UTC is the more human-useable and thus better.

[–] uis@lemm.ee 1 points 6 days ago

The post is about developers.

[–] kakes@sh.itjust.works 29 points 1 week ago (2 children)

I say we ditch this nonsense altogether and go back to vague descriptions of the Sun's position in the sky.

[–] Couldbealeotard@lemmy.world 2 points 6 days ago

"many moons ago, when the sun was low in the sky..."

load more comments (1 replies)
load more comments (4 replies)
load more comments (5 replies)
[–] lord_ryvan@ttrpg.network 32 points 1 week ago (4 children)

Timezones are fine to program around.
DST is a bit of a pickle to plan around, but can be done just fine by a computer program.

Historical dates; considering leap years, skipped leap years, and times when leap years weren't a thing or when humanity just decided we skip a bunch of years; are the bane of all that is good.

load more comments (4 replies)
[–] Ziglin@lemmy.world 31 points 1 week ago (2 children)

You've got make sure you program the time machine correctly though…

load more comments (2 replies)
[–] ipkpjersi@lemmy.ml 27 points 1 week ago (1 children)

Timezones are kind of a necessary evil though, because without them then you'd have to check regions (or zones) to see if 1PM in China is the same thing as 1PM in Australia is the same thing as 1PM in Bolivia.

[–] milkisklim@lemm.ee 6 points 6 days ago

Even then, 1pm in Beijing is something different than 1pm in the Tibet since all of China is technically one time zone.

[–] lugal@sopuli.xyz 21 points 1 week ago (10 children)

Aren't time zones quite straightforward? You add a whole number of hours and for some a half. Compare that to a sundial on the one side and having times that don't match your day at all on the other, I'd say it's good

[–] Zagorath@aussie.zone 30 points 1 week ago (8 children)

You add a whole number of hours and for some a half

Or three quarters in a few cases.

And of course there are cases where countries spanning as many as 5 "ideal" time zones (dividing the globe into 24 equal slices) actually use a single time zone.

And then when someone tells you the meeting is at 10:00 am, you have to figure out if they mean your time zone or theirs, and if they mean theirs, you then have to convert that to yours. Oh, but your conversion was wrong because one of you went into or out of daylight saving time between the day when you did the conversion and when the meeting took place.

load more comments (8 replies)
load more comments (9 replies)
[–] omgarm@feddit.nl 20 points 1 week ago (2 children)

Inagine going back hundreds of years to convince everybody in the world to use the same time. "No I know not everybody has a clock, but if you could consider sunrise midday that would make my job in the future much easier."

load more comments (2 replies)
load more comments
view more: next ›