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
you would need to check for different times of day for different locations
You have to do that now with time zones anyway.
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.
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…
…but it would be the same time in different locations? E.g. at the time I’m writing this it’s 660DFD56 in New York, London, Moscow, Tokyo, Moon, Mars, Andromeda etc.
The UK press every year makes a huge song and dance in opinion pieces about getting rid of DST. However I’m always horrified to see that people want us to keep British Summer Time instead of Grenwich Mean Time. I understand that there are “longer evenings” in BST; however we literally invented GMT and coerced the rest of the world to adjust their times based on that. From the point of view of being constantly compatible with UTC and having more consistent business hours for international companies it makes more sense to me if we kept GMT.
Also the longer evenings thing can be achieved by simply staying up an hour later. It’s not exactly like an hour is being stolen from you when the times switch, the change of clocks are mainly pointless admin.
Lastly I read an article recently that described a correlation between the incidence of heart attacks and the clocks changing. The theory is that just slightly messing with people’s sleeping patterns can cause additional strain on the body.
No the longer evenings are achieved by work starting and ending an hour earlier. And it’s literally easier to change the time zone than to change corporate culture.
So would you be team BST if we had to pick one? I’m just personally not sure it’s such a loss when the sun is out until 10pm at the height of summer.
Edit: to be honest that would probably be my 2nd preference. Anything except the system we have now where the clocks change!
I think I want work to end an hour earlier in the winter because of how early the sun sets, and care much less about the summer. So however it’s done, it would be great if office jobs could happen when it’s dark outside and we could live our lives during daylight.
Mmm yeah I’ve noticed that my retired parents keep telling me what a great summer we’re having every year and I’m completely unaware of it due to being cooped up inside.
The only downside of being in GMT is that programmers here almost never notice their timezone bugs when developing systems in the winter.
Still, avoiding a whole other class of bugs would be nice.
Another point for GMT, in the mid '70s, the US went onto DST year round for a couple years. People hated it so much they changed back to switching the time.
If we wanna do away with DST and BST, we need to go back to standard time, as the later sunset in the summer translates to no sunlight for workers in the winter
I’ve just said ‘fuck it’ and switched all my clocks to UTC. I don’t even care anymore.
Why not metric time(TAI)?
Is that supported in any common operating systems?
Yes, CLOCK_TAI here
Reasons just states difference, but does not answer why.
On the other hand, TAI does not take into account the variations in Earth’s rotation speed, which determines the true length of a day. For this reason, UTC is constantly compared to UT1. Before the difference between the two scales reaches 0.9 seconds, a leap second is added to UTC.
On average, Earth has been slowing down a bit over the past decades, so UTC is currently running 37 seconds behind TAI.
So leap seconds is advantage here?
There’s literally a section titled ‘why use UTC - not TAI?’.
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.
time always goes forward
It not always goes and not always forward. I think you need metric time(TAI) instread.
UTC always goes forward regardless of the timezone and local time. That is why you should use it. To take my EPG situation above, I stored program start / end times in UTC so they would render properly even if DST kicked in or not during the middle of the program.
Ok, this is more unix time quirk that can’t handle 24:00:00 and skipping 23:59:59.
UTC always goes forward regardless of the timezone and local time
But not unix time.
I stored program start / end times in UTC
If your program finishes in less than one seond it might report negative time.
I didn’t say Unix time, I said UTC. And no it won’t report negative time, not unless somehow the system clock was modified while it was running…
not unless somehow the system clock was modified while it was running…
Which is how most systems handle leap seconds.
Leap seconds still make time go forwards, not backwards. NTP clients would also resolve small time discrepancies while still advancing forwards prior to the next time sync.
Leap seconds can make time go both ways, but adding them makes time stop/go back because 24:00:00 cannot be represented as 1/86400 part of day N instead of day N+1 on major OSes. And they were only added so far.
Standardising on EST is fine; it’s just UTC plus a constant. If they flipped between EST and EDT, now that’d be insane.
Yes as long as the rules are known, but it’s really just better to do things sanely and leave no margin of doubt.
Yep, case in point flipping between EST and EDT may be “insane” but that’s the default for systemd-timesyncd. So now you have to be 100% certain that it’s disabled on your servers, and on the remote hosts interacting with them.
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.)
there are 24 time zones
Cunningham’s law says that this will generate some discussion in the replies!
No, there is entire continuum of time zones.
I feel you’re conflating TimeZones with ever-changing Daylight Savings time rules.
True but so do most computers. Computers have a database of timezones and time offsets around the world. Depending on the UTC date and time, and your current timezone it will look up what offset to apply to show the local time. The database is very gnarly since rules change over time, e.g. maybe in the 70s some countries had longer DST to counteract oil shortages.
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.
Was it related to banking?
Consumer health.
Good product, too. Won a bunch of awards. Unfortunately, the company has since gone out of business.
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.
well thats the funny thing, it’s technically not time travel, it’s just time dilation if you squint hard enough. So technically, it doesn’t matter.
I worked on a project that had a few spots where we compare a saved timestamp to the current time. During testing, the client would randomly change their device time a few days forward or backward and complain that things weren’t working as expected. I had to explain to them multiple times that they were basically time traveling, and the program was actually handling it fairly well all things considered.
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.
deleted by creator
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.
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.
I agree. It’s written like “ugh I’m used to timezones, now what?”.
deleted by creator
Time zones are part of it, but also daylight savings is a real pain in the ass. And like you said it gets particularly complicated when you’re dealing with a system that deals with these things as an afterthought, which seems to be a lot of older libraries for time. For instance, the Java date utils are a nightmare and are now considered semi deprecated replaced by a new java.time api. That is, of course, no help for the ridiculous amount of things that depend on these stupid date utils and no one wants to spend the dev hours to refactor.
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.
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.
This is an interesting thought:
If we had UTC before we decided on a lot of modern standards - by whatever means we got it - I wonder whether it would have just evolved that Celts are used to the sun rising at 4-10 on the clock, but an Ainu is entirely used to the sun rising at 13-19.
if we knew that people would be universally connected across the world, independent from the solar cycle. Than yes, absolutely this would have been considered.
We didn’t know that then, we do know that now, and we also know that when gas pumps in finland experience a leap year, they stop working. It’s literally Y2K but completely random, and entirely jumpscare based. You have no warning.
I mean i live in the midwest, in the summer i’m used to the sun setting at like 10pm. In the winter it sets at like 5-6pm.
My man.
The fact that i even have to think about timezones at all is hilarious to me. Jet lag? UTC would fix that, the time ANYWHERE you are is the time you are normally at, it’s just the day/night cycle that’s bunk. So now instead of being confused as to why things are pretty normal, but you feel utterly shit. You just feel very confused, and probably still tired, but it’s very obvious why.
This shit sends me into schizophrenic ramblings i swear to god PLEASE stop using timezones.
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.
There are some time libraries which actually work pretty well and allow you to manage things like Timezones. And then there are some abominations beyond my compression…
Have you tried 7zip?