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.
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.
DST
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.
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..
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.
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.
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.
Save a slap for the dude who invented sundials, and another slap for the dude who invented civilization.
This but unironically.
Imagine, if we were just all on the same time. It'd just make things, a little easier.
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
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?
I don't see any way whatsoever that could mean this project is not viable.
Now I'm thinking about an ex-programmer supervillain who does this as her big foray into supervillainy
You know the system before timezones was way worse, right? Every town had their own time.
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.
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.
If you want your sunrise to be at 12am, go ahead.
If you really want to fix something. Fix months
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.
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
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)
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.
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.
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.
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.
fr i keep saying this and nobody seems to think it's a good idea.
Fuck timezones, me and my homies operate on UTC.
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.
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.
The post is about developers.
I say we ditch this nonsense altogether and go back to vague descriptions of the Sun's position in the sky.
"many moons ago, when the sun was low in the sky..."
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.
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.
Even then, 1pm in Beijing is something different than 1pm in the Tibet since all of China is technically one time zone.
Programmer Humor
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.