this post was submitted on 12 Apr 2024
34 points (94.7% liked)

Programmer Humor

32439 readers
886 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 21 comments
sorted by: hot top controversial new old
[–] [email protected] 11 points 7 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] 9 points 7 months ago (1 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.

[–] [email protected] 1 points 7 months ago* (last edited 7 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] 0 points 7 months ago (2 children)

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

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

They'll settle for three-ish

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

pi = 3.1±0.05

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

[–] [email protected] 4 points 7 months ago* (last edited 7 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] 0 points 7 months ago (1 children)

And set the date format to YYYY.MM.DD for the entire world. Americans and Europeans can stop arguing.

this made me uncontrollably angry , its YYYY-MM-DD not YYYY.MM.DD

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

I'll do you one better: YYYY/MM/DD

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

YYYY-𝓜𝓜-DD

I like my months fancy.

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

As long as you don't switch them around with the days, it'll be fine

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

proceeds to write least significant digit to the left when using YYYY·MM·DD

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

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

[–] [email protected] 3 points 7 months ago (2 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] 1 points 7 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] 2 points 7 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] 2 points 7 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 7 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] 1 points 7 months ago

What is tz-database equivalent in batch language ?

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

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