this post was submitted on 03 Apr 2024
1104 points (96.2% liked)

Programmer Humor

19813 readers
154 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 20 points 8 months ago* (last edited 8 months ago) (4 children)

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.

[–] [email protected] 22 points 8 months ago (1 children)

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.

[–] [email protected] 2 points 8 months ago

My emotional brain thinks we should just give up and climb back into the trees.

Funny enough, a story just broke about a lunar timezone, which would lose a second or so every year relative to Earth due to relativity. If space travel becomes a big thing we're going to have to choose a frame of reference, and probably just go with Unix epoch in that frame as the universal time. Hopefully it doesn't happen to pass through a black hole, because there's no consistent way to define a frame of reference that's not subject to gravity.

[–] [email protected] 7 points 8 months ago (1 children)

Yes! Very much so.

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

[–] [email protected] 1 points 8 months ago

This guy has a lot of these, it's kind of a classic now. I hadn't even thought of managing days.

[–] [email protected] 6 points 8 months ago (4 children)

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.

[–] [email protected] 8 points 8 months ago (1 children)

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.

[–] [email protected] 1 points 8 months ago

Well the essay has a lot to discuss, part of which is already (or will be) addressed up and down thread, so towards your TL;DR:

Yes of course, I'm not suggesting to disrupt circadian rhythms. And yes, lookup tables for solar days will always be required, but I would argue this is an inherent complexity to how we measure time in relation to our behavioural patterns and environment. However doing that by using variously large timezones that do not quite match solar days at their edges anyway, with a lot of them changing their offsets by an hour for half the year, and some of them using half-hour offsets throughout the year, that is complexity added for administrative reasons which are partly obsolete and largely irrelevant to the question off what would benefit humanity as a whole the most.

If everybody were to use one single timezone you would memorise your relative offset to noon/midnight pretty fast. Like it's one number to remember, e.g. where you are 4:40am is noon, 4:40pm is midnight, your offset is -7:20. Having those times be (roughly) 12 (for half the year) is just tradition and something we have every child learn. We could teach them about solar offsets just as well. It's not even really more complex, arguably much less so since you remove the need to confuse them with the chaos that global timezones have grown to be historically.

[–] [email protected] 7 points 8 months ago* (last edited 8 months ago) (2 children)

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

[–] [email protected] 5 points 8 months ago (1 children)

Anyone who works nights, or an evening job that runs late like a bar or something, is currently used to having the date change in the middle of their "day". I don't think it's really that big of a deal. It would be super weird at first, but kids who grew up with it would find our current system just as bananas as we would find this.

[–] [email protected] 4 points 8 months ago

Yeah but you still mentally consider it to be the same day as the preceding day, until you go to sleep. (Unless you stay up all night but that's very uncommon, my sympathy to night shift workers)

If the date changes in the middle of the day, does that make the latter half of the day "tomorrow" from the first half? That's absurd to me.

[–] [email protected] 1 points 8 months ago (1 children)

The fact that you give a preference to change something here which you give as an example for something that shouldn't be changed because it would be problematic is deeply ironic to me.

Also, again, I don't really see the problem with changing the date in the middle of the day. It's virtually the same as changing it at 00:00 or 04:00, you change the date once every 24 hours. Right now you have a situation where one persons 3rd of the month could be another persons 2nd or 4th, depending on where on the globe they are. That's not really ideal either, especially for that call scheduling example by the GP.

[–] [email protected] 4 points 8 months ago (2 children)

Don't you think it makes sense for the date to change while ~everyone is asleep?

International light-speed communication is what we internet dwellers are used to but it's not most people's experience. Most people rarely talk to people from another continent.

[–] [email protected] 2 points 8 months ago* (last edited 8 months ago)

Tilde as natural language punctuation, meaning "roughly" or "approximately". I like it.

[–] [email protected] -1 points 8 months ago (1 children)

Oh don't get me wrong, I see how it makes sense. I'm just saying that 1) it is arbitrary nonetheless and 2) it doesn't outweigh the benefits that could be gained by using a single global timezone. Incidence angle of solar radiation is hardly something most people need or even want to track beyond a certain degree (dawn, noon, dusk, midnight), and the times that would coincide with at your latitude and longitude can be easily learned.

[–] [email protected] 5 points 8 months ago (1 children)

I guess I disagree about the benefits of a single global timezone. We already have that for technology to use - the unix timestamp. All potential benefits of a unified timezone could be (and are) gained by having software convert times to whichever timezone you need.

Maybe I'm missing something. What do you think the benefits would be?

[–] [email protected] -2 points 8 months ago (1 children)

We already have that for technology to use - the unix timestamp.

A unix timestamp is an offset to a UTC date, not a timezone. But fair enough, there is UTC. It's not used by default however, except by scientists and programmers maybe.

Maybe I’m missing something. What do you think the benefits would be?

Removing ambiguity from casual language. Currently when you state a time you are almost always implying your local timezone applies, which might be unknown information to the recipient, especially with written sources like these comments here. With everybody using the same timezone instead you would always make an unambiguous statement about the specific time by default.

[–] [email protected] 3 points 8 months ago (1 children)

Currently when you state a time you are almost always implying your local timezone applies, which might be unknown information to the recipient, especially with written sources like these comments here.

In most people's everyday life that's really rare. And when it does happen it's usually clarified. In more automated contexts (e.g. a scheduled YouTube premiere) the software converts it automatically - the author inputs the date and time in their own timezone, and viewer sees the converted date and time in their own timezone.

When it does happen it reminds us that the date and time falls on a different time of day for different participants.

With everybody using the same timezone instead you would always make an unambiguous statement about the specific time by default.

22:00, midday.

Person A: "Meet me here tomorrow at 01:00"

Person B: "Sure no problem"

... three hours later ...

Person A: "Ugh, I told him to be here at 01:00, where is he?"

... 24 hours later ...

Person B: "Ugh, he told me to come here at 01:00, where is he?"

[–] [email protected] 1 points 8 months ago (1 children)

And when it does happen it’s usually clarified. In more automated contexts (e.g. a scheduled YouTube premiere) the software converts it automatically - the author inputs the date and time in their own timezone, and viewer sees the converted date and time in their own timezone.

My point exactly though, this is a whole lot of complexity we could just get rid of by using a single timezone, with the added benefit of that working without any automation or clarification. Next Tuesday 14:00? Same time for everybody, regardless of locality. Everyone will know what part of the solar day that is for them by habit.

When it does happen it reminds us that the date and time falls on a different time of day for different participants.

The complexity of coordinating different solar cycles is there either way and unavoidable. So why not use the simpler system?

Meet me here tomorrow at 01:00

Yes, semantic drift in these terms would be unavoidable, but I still see the long-term benefits to clarity outweighing the short-term costs in it.

[–] [email protected] 2 points 8 months ago (1 children)

I can respect your position but I don't think you could ever change my mind. The date can't change in the middle of the day. I can't accept that.

[–] [email protected] 1 points 8 months ago

I don’t think you could ever change my mind.

Fair enough, I still think you'd get used to it if it were to happen.

[–] [email protected] 5 points 8 months ago (1 children)

It's not that simple as people has this urge to associate 12pm to noon and 12am to midnight. Just look at china where the whole country is under a single timezone despite spanning from UTC+05:00 to UTC+09:00. People on xinjiang ended up using their own unofficial timezone (UTC+06:00) for their daily activities instead of using china's official timezone (UTC+08:00) because it's inconvenient to them.

[–] [email protected] 3 points 8 months ago (2 children)

people has this urge to associate 12pm to noon and 12am to midnight

Yeah but that is exactly what I mean with habitual. It's a learned association of questionable utility. It can be unlearned and replaced with 0400 is noon or 1600 is noon based on your longitude just as well. Dawn and dusk are dependent on latitude and have to be learned for anything not smack-dab on the equator anyway.

I can see why that would be inconvenient to people, but I would maintain that is only so due to them clinging to a habit.

[–] [email protected] 9 points 8 months ago (1 children)

They just gave an example though of people who made up their own timezone because the official one was bad.

These systems exist for people and if no one other than programmers wants to do the internal calculus of "The sun is setting and they're a quarter of the earths rotation Eastward, so that means they're probably in bed" every time you want to call someone, then we shouldn't make the standard that way.

You also get some things that become way more complicated, like "send the user a notification at the start of the normal working day".
Right now you just look up the timezone in their profile and send it at 9:00, but without timezones, you need a "database of regional conventions for coordinating business hours", which is just a worse way of having timezones.

Timezones exist because they have a purpose. UTC exists because having some sort of coordinated universal time is helpful and people (outside of Greenwich) don't use it because it isn't helpful to them, except in specific circumstances.

It's like abolishing everything except latin1 because Unicode is a pain. Wanting to write your name in your traditional alphabet is just a habit that people can break.

[–] [email protected] 0 points 8 months ago (1 children)

They just gave an example though of people who made up their own timezone because the official one was bad.

Yeah, and in reply I argued that they did this out of not wanting to change their habit of associating 12 o'clock with noon. Which is in my opinion an understandable impulse but not a good reason to preserve the status quo.

These systems exist for people

Yeah fair, I'm aware I'm toeing unpopular opinion territory here.

and if no one other than programmers wants to do the internal calculus of “The sun is setting and they’re a quarter of the earths rotation Eastward, so that means they’re probably in bed” every time you want to call someone, then we shouldn’t make the standard that way.

But the standard is like that right now, worse even with DST and other complexities.

Right now you just look up the timezone in their profile and send it at 9:00, but without timezones, you need a “database of regional conventions for coordinating business hours”, which is just a worse way of having timezones.

Well no you need an offset. Like the user has set +8:30 as their offset, so send the notification at 00:30 UTC. That's not worse than having timezones, that's having timezones but simpler.

Timezones exist because they have a purpose.

Yeah, and some of those purposes are bonkers.

It’s like abolishing everything except latin1 because Unicode is a pain.

More like getting everyone to use Unicode, but whatever. Like I said I see why it would be unpopular to the point of being unenforceable, but that doesn't mean an unambiguous way of communicating time as the default would be entirely undesirable.

[–] [email protected] 3 points 8 months ago

My point is we have that unambiguous system you want. People don't use it except in specific circumstances. Instead of saying those people are wrong, you can look at why they don't use UTC for everything.

People don't use UTC because people aren't usually interested in universal time, they're interested in time of day, which is fundamentally tied to the position of the sun and people's day night cycles.
The people in China who made their own bootleg timezone illustrate that perfectly.

We don't currently have to reason about where someone is physically located to know if they're likely asleep. I'm in UTC-4. It's 15:30. It's 19:30 in London. I know the evening is advanced enough that I shouldn't call my coworker there, but early enough that I can if it's an emergency. I forgot California's timezone, so I googled it, and it's UTC-7, so it's 12:30 there. I should probably wait half an hour to call to avoid the typical lunch hour.
Otherwise I use a tool to look up and see that solar noon in California is around 20:00, so people are probably doing their midday routines then. Except that California shifted business hours so that they're offset an hour from solar noon to reduce energy consumption, which I didn't know.
And what do we do about places like Texas where solar noon varies by more than an hour on different ends of the state? For simplicity, most regions like to synchronize working hours inside their contiguous economic sphere. So I can assume that the state would pass a law relating to what time was considered "convention", since we need schools, businesses, banks and government services to be consistent inside a jurisdiction.
It's important we have stuff like that be uniform, because jurisdictions have laws about stuff like preventing teens from working during school hours, or preventing schools from starting class so early it interferes with children's sleep or staying in session so long it interferes with their evenings.
Texas can just mandate that standard business hours are 14:00 to 22:00.
Thank God they didn't end up having to mandate that the standard business day is split across two different calendar days like California. Imagine the hell of child labor laws when you have to stipulate that teens can't work between the hours of 15:00 and 1:00 the next day unless said scheduled interval begins on a weekend.
Business hours being posted as 00:00 - 03:00, 17:00-00:00 for things like Sandwich shops is my favorite though. "I closed for the night today at 3, but I'll be open again later today in the morning at 17" just has a delightfully complicated inhuman ring to it.

There's a reason people like their days to line up with their days, and we like to base our clocks around how we live our lives where we are, not where the sun in in Greenwich.

I fundamentally disagree that a system that's identical to how we work with timezones but non-standard, like a UTC offset system you describe, is simpler than timezones, which are standardized UTC offsets. At best it's timezones with a different name and more of them.

Latin1 is far simpler than Unicode, and doesn't have conversion issues. It's static and very difficult to get wrong. It's clearly a better match for comparison to UTC-only. It's only downside is that it leaves everyone outside of a small segment of the worlds population to build their own janky system for dealing with their silly human need to reason about time in an intuitive sense/write their names.

[–] [email protected] 4 points 8 months ago* (last edited 8 months ago) (1 children)

It could be worse. What would happen on people that live in UTC+12:00 ? When your friend say "lets meet on Tuesday", which Tuesday it is (because the day changes at noon)? People will resist such majorly inconvenience changes unless the benefit of switching is clear for them. Forcing unpopular changes will guarantee people using unofficial timezone which cause even more confusion down the line.

[–] [email protected] 1 points 8 months ago

What would happen on people that live in UTC+12:00 ? When your friend say “lets meet on Tuesday”, which Tuesday it is (because the day changes at noon)?

Given how +12 is at the front of the "date wave" currently they would probably take it to mean the Monday/Tuesday noon.

People will resist such majorly inconvenience changes unless the benefit of switching is clear for them. Forcing unpopular changes will guarantee people using unofficial timezone which cause even more confusion down the line.

Yeah fair. To me the benefit is clear, there is no good rhyme or reason to timezones as a totality, we should come up with a better system. A straightforward approach like using UTC offsets seems best.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago) (1 children)

And the problem with that is… ?

Subjective. It seems like it would be a bit confusing, though, if you had to relearn times whenever you travel somewhere (edit: and dates could flip over in the middle of a work day). But maybe you'd prefer that.

If you get rid of timezones they all say the same time, no?

Before they were invented, it was literally just anarchy. People set it to match people they knew. That's what I was thinking of, but it could also just be one place where noon is at 12:00 PM.

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

Well, there's not a round number of second in a day, or days in a year, for example, since they're all naturally occurring and arbitrary. And then the Earth turns at a subtly non-constant rate, and people have settled on a seven day week. If you do have timezones, it doesn't make sense to be inflexible with them when they run up against geography or trade and cultural ties, so they'll be curvy, and geopolitics will itself change over decades and someone will want to change which one they're in. All of this is a headache if you just want to do a calendar calculation.

[–] [email protected] 1 points 8 months ago (1 children)

It seems like it would be a bit confusing, though, if you had to relearn times whenever you travel somewhere (edit: and dates could flip over in the middle of a work day). But maybe you’d prefer that.

I'd prefer that over having to change clocks when you travel, and having to have knowledge about the location and possibly having to flip the date when you encounter a reference to a specific time, yes.

Before they were invented, it was literally just anarchy. People set it to match people they knew. That’s what I was thinking of, but it could also just be one place where noon is at 12:00 PM.

Yes, you would obviously do the latter. No sense it going back to the bad old days.

Well, there’s not a round number of second in a day, or days in a year, for example, since they’re all naturally occurring and arbitrary.

Days in a year ok (except leap years). But seconds in a day are round (discounting days with leap seconds). 24 * 60 * 60 = 86400, which is divisible by two. Did you mean they are not based on the decimal system? I'd be up for a decimal based time system and a reorganised calendar, but that wasn't the topic of discussion here.

And then the Earth turns at a subtly non-constant rate, and people have settled on a seven day week.

Yeah but none of that has much impact on the timezone debate.

If you do have timezones, it doesn’t make sense to be inflexible with them when they run up against geography or trade and cultural ties, so they’ll be curvy, and geopolitics will itself change over decades and someone will want to change which one they’re in.

Fair enough. I acknowledged this point in my other post, that there are historical reasons for timezones mostly rooted in administrative requirements. But I don't think this is a good reason to not adopt a better system per se.

All of this is a headache if you just want to do a calendar calculation.

Exactly! So out with the old, in with the new. Sure this will create some other headaches, especially given how deeply rooted some of the relevant nomenclature is in most languages, but the sooner we change this the less it will hurt. I see that it might be a non-starter given the inertia and disunity of globalised society working against it, but it still seems desirable nonetheless, to me at least.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago)

Days in a year ok (except leap years). But seconds in a day are round (discounting days with leap seconds). 24 * 60 * 60 = 86400, which is divisible by two. Did you mean they are not based on the decimal system? I’d be up for a decimal based time system and a reorganised calendar, but that wasn’t the topic of discussion here.

Oops, I thought seconds were defined by the meter at some point. Nope, a pendulum 1/40000 of the distance from the pole to the equator just happens to measure the second near-perfectly, but the second stayed defined by astronomical motions until the atomic standard. Still, do to said variability of the Earth's rotation since then it's 86400.002, so even if it stopped changing we'd need leap seconds.

The point being that even if you get rid of timezones the calendar will still suck to work with. I question whether we should even have fixed days, months and years, if the time doesn't relate to the position of the sun in the sky. You might as well just go with Unix epoch, and leave days to be informal. Of course, then you'd have to calculate multiples of 86400 a lot to set appointments. Maybe we need a new decimal second as well.

[–] [email protected] 0 points 8 months ago (1 children)

China uses a single timezone where similar width countries use three or more. So some parts start the day at 8am, others start at 10am

If we used a single timezone in the west it would be UTC which is practically on the other side of the world to me - I'm in +11 now, +10 when we go back to standard time in a week. That would make it reasonably easy here, the clock would be out by near enough to 12 hours (if you prefer light in the evening) that you'd be fine on a 12 hour clock just inverting am and pm

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago)

America would be a trip, though. 8 PM sunrise would be a thing depending on time of year.

TIL about China.