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

Programmer Humor

32472 readers
982 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 147 points 4 months ago* (last edited 4 months ago) (31 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.

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

Oh yeah, please do imagine there is no such thing as a time zone.

On an ellipsoid!

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

No, see, how it would work without timezones is:

  • Everyone would use UTC and a 24-hour clock rather than AM/PM.
  • If that means you eat breakfast at 1400 hours and go to bed around 400 hours and that the sun is directly overhead at 1700 hours (or something more random like 1737), fine. (Better than fine, actually!)
  • Every area keeps track of what time of day daily events (like meals, when school starts or lets out, etc) happen. Though I think generally rounding to the nearest whole hour or, maybe in some cases, half hour makes the most sense. (And it's not even like everyone in the same area keeps the same schedule as it is now.)
  • You still call the period before when the sun is directly overhead "morning" and the period after "afternoon" and similarly with "evening", "night", "dawn", "noon", "midnight" etc.
  • One caveat is that with this approach, the day-of-the-month change (when we switch from the 29th of the month to the 30th, for instance) happens at different times of the day (like, in the above example it would be close to 1900 hours) for different people. Oh well. People will get used to it. But I think it still makes the most sense to decide that the days of the week ("Monday", "Tuesday", etc) last from whatever time "midnight" is locally to the following midnight, again probably rounding to the nearest whole hour. (Now, you might be thinking "yeah, but that's just timezones again. But consider those timezones. The way you'd figure out what day of the week it was would involve taking the longitude and rounding. Much simpler than having to keep a whole-ass database of all the data about all the different timezones. And it would only come into play when having to decide when the day of the week changes over.)
  • Though, one more caveat. If you do that, then there has to be a longitudinal line where it's always a different day of the week on one side than it is just on the other side. But that's already the case today, so not really a drawback relative to what we have today.
[–] [email protected] 7 points 4 months ago* (last edited 4 months ago) (1 children)

You still call the period before when the sun is directly overhead “morning” and the period after “afternoon” and similarly with “evening”, “night”, “dawn”, “noon”, “midnight” etc.

Note that the Sun position is not consistent throught the year and varies widely based on your latitude.

In Iceland (and also Alaska) you can have the Sun for a full 24 hours in the sky (they call it "midnight sun") during Summer solstice (with extremelly short nights the whole summer) and the opposite happens in Winter, with long periods of night time.

I think it still makes the most sense to decide that the days of the week (“Monday”, “Tuesday”, etc) last from whatever time “midnight” is locally to the following midnight, again probably rounding to the nearest whole hour.

Just the days of the week? you mean that 2024-06-30 23:59 and 2024-07-01 00:01 can both be the same weekday and at the same time be different days? Would the definition of "day" be different based on whether you are talking about "day of the week" vs "universal day"?

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

Note that the Sun position is not consistent throught the year and varies widely based on your latitude.

Good call. The definitions of "noon" and "midnight" would need to be formalized a bit more, but given any line of longitude, the sun passes directly over that line of longitude "exactly" once every 24 hours. (I put "exactly" in quotes because even that isn't quite exactly true, but we account for that kind of thing with leap seconds.) So you could base noon on something like "when the sun is directly over a point on such longitudinal line (and then round to the nearest hour)."

Could still be a little weird near the poles, but I think that definition would still be sensical. If you're way up north, for instance, and you're in the summer period when the sun never sets, you still just figure out your longitude and figure when the sun passes directly over some point on that longitudinal line.

Though in practice, I'd suspect the area right around the poles would pretty much just need to just decide on something and go with it so they don't end up having to do calculations to figure out whether it's "afternoon" or "morning" every time they move a few feet. Heh. (Not that a lot of folks spend a lot of time that close to the poles.) Maybe they'd just decide arbitrarily that the current day of the week and period of the day are whatever they currently are in Greenwich. Or maybe even abandon the use og day of the week and period of the day all together.

Just the days of the week? you mean that 2024-06-30 23:59 and 2024-07-01 00:01 can both be the same weekday and at the same time be different days? Would the definition of "day" be different based on whether you are talking about "day of the week" vs "universal day"?

Yup.

I'm just thinking about things like scheduling dentist appointments at my local dentist. I'd think it would be less confusing for ordinary local interactions like that if we could say "next Wednesday at 20:00" rather than having to keep track of the fact that depending what period of the day it is (relative to landmarks like "dinner time" or "midmorning") it may be a different day of the week.

And it's not like there aren't awkward mismatches beteen days of the week and days of the month now. Months don't always start on the first day of the week, for instance. (Hell. We don't even agree on what the first day of the week is.) "Weeks" are an artifact of lunar calendars. (And, to be fair, so are months.)

(And while we're on the topic of months, we should have 13 of 'em. 12 of length 30 each and one at the end of 5 days or on leap years 6 days. And they should be called "first month", "second month", "third month", etc. None of this "for weird historical reasons, October is the 10th month, even though the prefix 'oct' would seem to indicate it should be the 8th" bs. Lol.)

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

regarding day change, you could also just have it change at UTC midnight and the entire planet bongs at that time if they're awake.

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

Bank holidays would be really awkward. You start wort at 23 and the next day is off so you would just have to work that one hour.

Office workers could probably move hours around. It would get complicated for shift workers though. Paying overtime for work on holidays?

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

My experience is that you start work and the next day is off so you just lock the doors and keep working, but maybe there are financial institutions without backlogs idunno.

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

Yeah. I figured the day-of-the-month change should definitely happen at UTC midnight. I kindof like the idea that a day of the week lasts from before I wake up to after I go to sleep. (Or at least that there's no changeover during business hours.)

But hell. If you wanted to run for president of the world on a platform of reforming date/time tracking but planned for the days of the week to change at midnight UTC, I'd still vote for you.

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

No, take tHe NeW jErSeY approach. Keep the implementation simple.

Everyone, everywhere on UTC.

  • 7:00 - Everyone wake up at

  • 8:00 - Everyone go to school/work 8:00 AM

  • ...

  • 21:00 - Everyone sleep.

We'll figure out the logistics as we go.

load more comments (29 replies)