1119
top 50 comments
sorted by: hot top controversial new old
[-] Malix@sopuli.xyz 240 points 8 months ago

I'm ok with timezones, but the guy who invented daylight savings time I'd slap to all the way to the sun

[-] Scoopta@programming.dev 22 points 8 months ago

From a development perspective it certainly sounds easier to have one global timezone with DST than a bunch of smaller ones without it. Would that make sense in reality? Probably not but I definitely think timezones take more work to compensate for properly.

[-] fidodo@lemmy.world 49 points 8 months ago

What matters is consistency and our time system has tons of crazy inconsistent shit in our. Everyone knows about leap years, but do you know about leap seconds? Imagine trying to write a function to convert unix time to a current date and suddenly all your times are a second off.

Just look at this insane bullshit nonsense. The added complexity of time zones and daylight saving time is nothing compared to simply supporting our time system.

load more comments (4 replies)
load more comments (6 replies)
[-] scottywh@lemmy.world 15 points 8 months ago

Switching sucks but DST is better than Standard Time.

[-] snooggums@midwest.social 13 points 8 months ago* (last edited 8 months ago)

Which part of the year is DST and which part is Standard Time?

I know, but it seems like half the people that say they prefer DST have it backwards.

[-] scottywh@lemmy.world 15 points 8 months ago

It's easy, the good part is DST (which is what we're currently in - Spring through Fall in the northern hemisphere).

load more comments (3 replies)
load more comments (2 replies)
[-] CosmicCleric@lemmy.world 8 points 8 months ago

Love me some early evening daylight though. Nice warm but not hot cruise/drive with the windows and the top down on the car.

load more comments (25 replies)
[-] fubarx@lemmy.ml 82 points 8 months ago

Worked on a project where devices just magically froze, but only during the month of February!

Turned out the people who had written the firmware had decided to do their own time math to save space and had put in an exception in the code for leap year values. Except instead of February 29th, it kicked in for the whole month. And the math was wrong so you ended up with negative values.

The product was due for launch in March of that year and was headed to manufacturing. It was by sheer luck that someone ran a test on February 1st and caught the problem.

Don't mess with time in code, kids.

load more comments (2 replies)
[-] perviouslyiner@lemmy.world 66 points 8 months ago
[-] someguy3@lemmy.world 44 points 8 months ago* (last edited 8 months ago)

Ok so there are 24 time zones. Before that every town had their own time based on the sun. We basically went from infinity time zones down to 24. This is in fact simpler.

(There are some half hour time zones too, (India, Newfoundland) so at least 26.)

[-] zaphod@sopuli.xyz 25 points 8 months ago

There are a few time zones that are 45 minutes off, like Nepal Standard Time which is UTC+5:45, some places in Western Australia and South Australia use UTC+08:45 and the Chatham Islands are at UTC+12:45 or UTC+13:45 in summer.

[-] WalrusDragonOnABike@reddthat.com 8 points 8 months ago

DST means you also have things like CST vs CET and given some places start DST earlier or later than others and some ignore it all together, we probably have at least 50 time zones.

Always fun trying to schedule international regular meetings when suddenly there's a week when half the people's times changed and the other half's times haven't yet, so you try to figure out which time would exclude the fewest essential people.

load more comments (1 replies)
[-] perviouslyiner@lemmy.world 10 points 8 months ago

there are 24 time zones

Cunningham's law says that this will generate some discussion in the replies!

load more comments (1 replies)
[-] KillingTimeItself@lemmy.dbzer0.com 38 points 8 months ago

not a programmer myself, but actually fuck you, UTC was the correct choice, anything that isn't UTC is a wrong choice, and i will literally fight to my death over this.

Timezones are dumb and stupid, and you cannot convince me otherwise, so far the single best argument i've heard is "well actually, the hands on a clock and the numbers themselves roughly represent the cycle of the sun in the sky during the day." Which is pretty good, until you realize that clocks tend to be circles, and you can often just rotate them. And suddenly, the numbers now match up perfectly. But i've also never once heard of someone caring about that specific feature, so uh. Good riddance frankly.

Timezones kind of made sense back in the day, when the sun was the only realistic timing system, and pre internet, when people stayed where they were. But now that people don't do that, and the internet tends to do this thing where it exists. I refuse to believe it makes more sense to have timezones than not.

"Hmmm yes please, i would like to order the time here, but halfway across the globe please" - statements dreamed up by the utterly insane.

ok that concludes my rant. Now i'm going to go set FUCKING DAYLIGHT SAVINGS TIME on my clock because FOR SOME REASON THE TIME JUST CHANGES HALFWAY THROUGH THE YEAR FUCK YOU.

load more comments (12 replies)
[-] redcalcium@lemmy.institute 34 points 8 months ago

Soon we're going to have a new timezone for the moon. Yay, I guess?

[-] synae@lemmy.sdf.org 17 points 8 months ago

Surely they will just use utc?

[-] redcalcium@lemmy.institute 27 points 8 months ago* (last edited 8 months ago)

Can't be that simple due to time dilation effect. Time moves at a different rate in moon, about ~~1s~~ 58.7 μs difference per day.

https://www.reuters.com/science/white-house-directs-nasa-create-time-standard-moon-2024-04-02/

[-] davidgro@lemmy.world 18 points 8 months ago

That article says 58.7 microseconds per (Earth) day. Not 1s.

[-] redcalcium@lemmy.institute 11 points 8 months ago

Shit you're right, I misremembered it.

[-] RustyWizard@programming.dev 8 points 8 months ago* (last edited 8 months ago)

Appreciate you correcting your post, just one more needed.

ms = milliseconds

us = microseconds

load more comments (1 replies)
load more comments (1 replies)
[-] brianorca@lemmy.world 30 points 8 months ago

The guy that invented time zones was solving a problem where each little town had their own time standard. I don't think that was sustainable.

[-] technojamin@lemmy.world 29 points 8 months ago

I used to feel this way. Over the course of building out 2 calendar systems in my career (so far) and having to learn the intricacies of date and time-related data types and how they interact with time zones, I don’t have much disdain for time zones. I’d suggest for anyone who feels the same way as this meme read So You Want To Abolish Time Zones.

Also, programmers tend to get frustrated with time zones when they run into bugs around time zone conversion. This is almost always due to the code being written in a way that disregards the existence of times zones until it’s needed and then tacks on the time zone handling as an afterthought.

If any code that deals with time takes the full complexities of time zones into account from the get-go (which isn’t that hard to do), then it’s pretty straightforward to manage.

[-] Maltese_Liquor@lemmy.world 9 points 8 months ago

This did little to convince me that timezones are an unnecessary construct. Pretty much every point made was done from the perspective of someone who had already decided their opinion rather than objectively weighing the pros and cons.

load more comments (5 replies)
load more comments (2 replies)
[-] ytg@sopuli.xyz 26 points 8 months ago* (last edited 8 months ago)

Before timezones and trains, each town had its own natural time (based on the sun or whatever). Would you have preferred that?

load more comments (1 replies)
[-] CanadaPlus@lemmy.sdf.org 25 points 8 months ago* (last edited 8 months ago)

Cool, so sunrise is at 8 PM now. Or maybe there's just no consistent relationship between what a clock on the East and West coast of America say, and a call can't be scheduled between them.

The real problem with time and date is that it has to fit social and natural systems as well as actual passage of time. A lot of nuance is unavoidable.

[-] thanks_shakey_snake@lemmy.ca 22 points 8 months ago

Yeah, tbh the "no timezones" approach comes with its own basket of problems that isn't necessarily better than the "with timezones" basket. The system needed to find a balance between being useful locally, but intelligible across regions. Especially challenging before ubiquitous telecommunications

Imagine having to rethink the social norms around time every time you travel or meet someone from far away. They say "Oh I work a 9-to-5 office job" and then you need to figure out where they live to understand what that means. Or a doctor writes a book where they recommend that you get to bed by 2:00PM every night, and then you need to figure out how to translate that to a time that makes sense for you.

We'd invent and use informal timezones anyway, and then we'd be writing Javascript functions to translate "real" times to "colloquial" times, and that's pretty close to just storing datetimes in UTC then translating them to a relevant timezone ad hoc, which is what we're already doing.

That's what my rational programmer brain says. My emotional programmer brain is exactly this meme.

load more comments (1 replies)
[-] Muehe@lemmy.ml 10 points 8 months ago

Cool, so sunrise is at 8 PM now.

And the problem with that is... ?

Or maybe there’s just no consistent relationship between what a clock on the East and West coast of America say, and a call can’t be scheduled between them.

If you get rid of timezones they all say the same time, no? If you want to schedule a call you just say the time and save the timzone offset fiddling.

The real problem with time and date is that it has to fit social and natural systems as well as actual passage of time.

Can you give any more concrete examples? None come to mind beyond habit, which is not an immutable thing.

[-] davidgro@lemmy.world 9 points 8 months ago

Here's a quick essay about the problems with it.

TL;DR - as long as people generally prefer to sleep when it's dark and wake when it's light (and they always will in general) time zones are basically needed as a form of lookup table for when to try to communicate with other places.

load more comments (1 replies)
[-] NeatNit@discuss.tchncs.de 8 points 8 months ago* (last edited 8 months ago)

And the problem with that is… ?

The problem is that the date changes in the middle of the day. 00:00 ("midnight") should occur around the middle of the night, so that one day (sunrise to sunset) has a single date assigned to it.

In my opinion it would make more sense to set 00:00 at slightly before sunrise (roughly 4:00 by my clock), that way one night "belongs" to the day that preceded it. But for whatever reason they decided that the date changes in the middle of the night. That's fine. Middle of the day would not be fine.

Edit: hey cool, Japan kinda agrees with me! https://en.wikipedia.org/wiki/Date_and_time_notation_in_Japan#Time

load more comments (12 replies)
load more comments (10 replies)
[-] davidgro@lemmy.world 8 points 8 months ago

Yes! Very much so.

This is a good illustration of exactly why timezones exist and the issues with not having them.

load more comments (1 replies)
load more comments (2 replies)
[-] JayDee@lemmy.ml 20 points 8 months ago* (last edited 8 months ago)

I've just said 'fuck it' and switched all my clocks to UTC. I don't even care anymore.

load more comments (12 replies)
[-] lhamil64@programming.dev 17 points 8 months ago

But if time travel is a thing, imagine the whole new time nightmares! Oh you went back a year with your phone? Now all your TLS root certs are invalid because you're before the start date. Or you have files/emails/whatever that are dated in the future. I guess you can get to that state by just setting your clock forward but I imagine some stuff would break.

load more comments (2 replies)
[-] arc@lemm.ee 15 points 8 months ago* (last edited 8 months ago)

I once developed an electronic program guide for a cable TV company in New Zealand and I'd lose my mind if I had to use timezones. The basic rule of thumb was:

a) Internally you use UTC religiously. UTC is the same everywhere on Earth, time always goes forward, most languages have classes that represent instants, durations etc. In addition you make damned sure your server time is correct and UTC.

b) You only deal with timezones when presenting something to a user or taking input from a user

Prior to that I had worked for a US trading company that set all their servers to EST and was receiving trades through the system which expressed time & date ambiguously. Just had to assume everywhere that EST was the default but it was just dumb programming and I bet to this day every piece of code they develop has time bugs.

load more comments (13 replies)
[-] ipkpjersi@lemmy.ml 13 points 8 months ago* (last edited 8 months ago)

Except if there was only one zone of time that would be hell to program too because then you would need to check for different times of day for different locations. I think programming is just difficult lol

[-] kreiger@lemmy.world 7 points 8 months ago

you would need to check for different times of day for different locations

You have to do that now with time zones anyway.

[-] Opisek@lemmy.world 8 points 8 months ago* (last edited 8 months ago)

I think the comment was more about phases of the day. Like for example, your phone might come pre-installed with a sleep mode from 23:00 to 06:00, which roughly fits for most users. Should we use UTC everywhere, then you'd have to have different presets for different parts of the globe.

Or say you wake up just a bit after sunrise at 7am everyday and you fly across the continent for vacation. Now you have to change all your alarms because sunrise is suddenly at 3am.

Or what if you're writing a book and you want to tell the reader what time it is: 15:00 will mean something else to readers around the world. And while you could attempt to cover it up with "15:00 in the afternoon", there will still be a disconnect between your words/intentions and what the reader pictures.

UTC would be a bliss for programming and scheduling events in this funny little globalized world, but as animals we still base our days on the burning fireball in the sky and removing that connotation from our timekeeping messes with linguistics and clear communication.

I don't think the system we have is perfect either, but I don't think employing UTC everywhere is the way and I don't have other suggestion either.

[-] jdeath@lemm.ee 9 points 8 months ago

and then boom congratulations you just reinvented time zones except worse, & everyone's gonna do their own way and they're all gonna be slightly different.

but at least your code will be simpler. oh, wait...

load more comments (1 replies)
[-] jabjoe@feddit.uk 8 points 8 months ago

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. 😃

load more comments (2 replies)
[-] CosmicCleric@lemmy.world 7 points 8 months ago

If only I had a numeric type that could hold the value of how many seconds since the creation of the Universe, without overflowing, I'd be set.

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 03 Apr 2024
1119 points (100.0% liked)

Programmer Humor

19821 readers
1 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

founded 2 years ago
MODERATORS