this post was submitted on 12 Apr 2024
320 points (96.8% liked)

Programmer Humor

31812 readers
592 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 47 comments
sorted by: hot top controversial new old
[–] [email protected] 106 points 4 months ago (2 children)

The article: https://www.politico.eu/article/norway-arctic-region-asks-eu-commission-for-26-hour-day/

How would the new time zones work in practice? Wenche Pedersen, the mayor of Vadsø who authored the letter, is unsure.

“We haven’t thought a lot about that” she said. “The clock will go from 12 to 13… and we have to see how this will go. I don’t think they’re going to say yes so we haven’t thought about all the details.”

Huh. Great idea.

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

Make a proposal without a plan or a feasibility study is peak management. Starting to understand how I end up with projects with very firm deadlines that are only vaguely defined and no one is sure if we have the resources on hand.

[–] xmunk 3 points 4 months ago

In this case I suspect this mayor simply made this proposition to get their town some free publicity. I am more sympathetic to these performative actions if they're just for the media attention.

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

When every decision is made by people alienated from every material or functional concern by like ten layers of abstraction, all decisions smell of recent severe skull deforming head trauma.

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

I hear they're also declaring that pi equals three.

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

What the fuck? I can see pi being shortened to 3 for baby's first geometry problem, but 5?

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

I assume this is just to get people use to the idea of algebra.

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

They'll settle for three-ish

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

pi = 3.1±0.05

Gotta allow for a little uncertainty, just to absolutely ruin everything.

[–] xmunk 55 points 4 months ago (4 children)

If you're not using tz_database or equivalents for literally all date-time logic, if 24 or 60*60 are constants defined in your project... you're doing it fucking wrong. I don't know how many times we need to break out the idiot club, but date, time and timezones are extremely complicated - unless your business is primarily concerned with them you must use a library or service.

Do Not Reinvent This Wheel

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

What does tz_database do? Wikipedia makes it seem like it basically converts a pair (geocoordinatr, utc time) to local time

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

From my very basic understanding, yeah that's basically what it does. However it accounts for a whole lot more into adding or subtracting from UTC. Timezones aren't absolute, they're political. Timezones have weird rules, and history that needs to be somehow expressed in the code to get the right time. That's what's sets tz_database apart from just looking at a map and saying it's +7 UTC.

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

So it updates now and then with new rules, and it keeps historical rules for past dates?

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

I think so. Like I said, I have a very basic understanding of it. There are definitely a lot of people who know more about this than I do.

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

What is tz-database equivalent in batch language ?

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

IMO it's not that complicated, most time data still stores time as the number of seconds since Jan 1 1970. As long as people are interpreting UNIX Time correctly then there should be no issues no matter how you divide that up.

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

Unix time is not the number of seconds since 1/1/1970 this is a common misconception. It's the number of days since 1/1/1970 times 86400 plus the number of seconds elapsed in the current day. These two systems of measurement are almost always the same, yay! But... not always.

Unix time will occasionally double count the same seconds when leap seconds are involved. As an example please enjoy an outage in 2012 caused by this very issue: https://www.wired.com/2012/07/leap-second-glitch-explained/

Date and time are more complicated than we give it credit for. You can use Unix time and be nearly always correct but you are still wrong.

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

That is news to me, and it very clearly would cause problems with the 26 hour day as well.

[–] xmunk 1 points 4 months ago

This is the nichest of niche edgecases so don't feel bad about being unaware of it. It's extremely arcane knowledge that developers shouldn't generally bother learning... but it's an excellent example of my initial statement. The maintainers of tz_database know this shit and plenty of other obscure bullshit they know it and build it into their library of functions so that we don't need to worry about it. And that is an excellent reason to not reinvent the wheel.

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

I once worked with a framework that was incompatible with libraries. All of them.

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

Seems like these idiots have too much time on their hands already.

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

Excellent comment.

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

And when you have something, you want more and more of it

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

I'd start with a 13 month/28 day calendar and planetary time (all clocks set to UTC).

EDIT: And set the date format to YYYY.MM.DD for the entire world. Americans and Europeans can stop arguing. The Japanese got it right.

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

And the extra day is a special interstitial holiday in the "14th" month, right? And leap days go into that holiday month as well.

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

No, "new years day" would just be a day all by it's self, global celebration day... And get this, every 4 years you get two party days.

Obviously this will never happen, the world would all have to agree on the change..., which isn't going to happen. Oh well it is nice in theory.

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

Isn't that what I said?

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

That fourteenth month should be managed by Congress, every year they could vote on whether we'd have it or not.

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

Lmfao, that would totally be the solution the US would implement. "How can we do this in the most complicated, error-prone way?"

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

The symmetry calendars (Wikipedia) use a leap week each several years, which seems like a reasonable way of doing it

Apparently the author of those calendars thought that would bring on board the people who believe days following an unending sequence is important - those who think their holy day has to be an actual whatever-day not one out of sequence due to intercalary days

Ed. Linkified the calendar

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

Ahh, that makes sense. Here I was thinking it would be fun to have a day or two every year that weren't any day of the week.

The leap week is a little bit of an unsatisfying solution since it means solstices and equinoxes will shift around a lot more. Also not as likely to get governments and employers to be willing to treat them as holidays.

I highly doubt we'll move from our current calendar anytime soon. Its flaws aren't bad enough to justify the effort, but I would really love a more symmetrical calendar. And payroll folks would probably love it too. Hourly and salary structures would be a lot more in sync.

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

On the other hand the calendar is always the same, years always start on a Monday, months start on a Monday

You could have a permanent calendar, except that religious holidays and astronomical events (solstices, equinoxes, best day for planting tulips) would move around

My birthday would vanish as it's towards the end of one of the middle months; my mother's birthday would only happen in leap years as it's late in the last month

Birthdays on the new calendar would always fall on the same week day (though people born under the old calendar could celebrate on the day that it would be had the old calendar continued, or choose the same day number and month, or choose the corresponding day in the first year (or whatever) of the new calendar and stick to that month and day number)

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

Almost all of this would be true if we celebrated a day (or two) each year that were outside of the months and weeks, except events tied to points in our orbit would stay put a lot more. We would still have the same calendar every year. In your version we have a full extra week every 6 or so years, in mine every year we have a dedicated New Year's Day that isn't in a regular month or a day of the week, and every 4 or so years (same rules as now) we have 2 New Year's Days.

Though I would argue for Sunday being the 1st day of each month/year. IMO weekends should be like bookends, one on either side.

Edit: your Wiki link contained a link to the International Fixed Calendar, which I've been inadvertently arguing for. This is almost identical to what I've been proposing, except they put the leap day at the end of June. But it fixes the major disadvantage of your system: that a year isn't a year. In your system 1/1 is never one year away from 1/1. In mine it is within leap day drift, just like the current calendar.

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

Time for all the maintainers of datetime libraries to unionize and give a collective nope.

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

I leave the country for six goddamn months and they pull this shit while I'm away???

[–] sbv 6 points 4 months ago

I wouldn't go back, if I were you.

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

Is the idea to have longers days or shorter hours? Eitherway: why?

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

Longer days. Which kind of works in an area where the sun doesn't rise all winter and doesn't set all summer. Until you have to consider having to work with anyone else. Not only do you have timezone offsets that change every day, you get date offsets. After less than a month, you're already two days off from the rest of the world.

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

Remindes me of Mars. Never been there but the researchers who controlled the rovers had Mars time which is slightly off but very slidely. And since there were several rovers ad once, each team, or rather each floor, had their own time zone.

[–] BlueMagma 1 points 4 months ago

Thanks now I can visualize how that would work, it's actually pretty cool. And the reasons is good, i can see myself doing tourism in a place like that for this reason.

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

Which kind of works

I guess... If they really don't care about time of day coinciding with the placement of the sun. Ever. Unless they're only running 26h days summer and winter but 24 hour days during spring and fall..? This would be FUN!

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

The funny part is 24 and 60 are already great numbers to base your time system on. They're both very divisible which means you can divide up the day or hour into halves, thirds, and quarters without dealing with fractional time periods. It would remove a practical aspect of time keeping to no benefit.

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

So maybe divide the 26h day into 24 time units or make the day not 26h but 60h

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

Link.

No, they don't really explain why that's better. The main reason given is to attract people, so in other words it's a stunt.

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

"By extending the length of the days, Pedersen hopes that more people will be inspired to move to the remote region. Ensuring that the area is populated is “more important than ever” in light of Russia’s war against Ukraine, Pedersen added."

Yup. Imagine the ads for this:

Move here and age slower (disclaimer: you might have to change your birthday because we needed to remove some days from OUR calendar.

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

Reminds me of DS9. This isn’t Bajor though.