https://xkcd.com/2867

Alt text:

It’s not just time zones and leap seconds. SI seconds on Earth are slower because of relativity, so there are time standards for space stuff (TCB, TGC) that use faster SI seconds than UTC/Unix time. T2 - T1 = [God doesn’t know and the Devil isn’t telling.]

123 points
*

We use datediff in sql and let God handle the rest.

“Oh but they’re in different time zones” “Oh did you account for if one is in day light savings and other isn’t” “Aren’t some of these dates stored in UTC and some local?”

Are all problems I do not care about.

permalink
report
reply
50 points

This is why we should just move to a universal time zone and stop with the day light savings.

permalink
report
parent
reply
4 points

Swatch’s Internet Beats are making more and sense every time Daylight Savings forces a timezones change. Why are we still using base 12 for time anyway?

permalink
report
parent
reply
51 points
*

We have that, it’s called Unix time, and the only thing it doesn’t account for is time dilation due to relativity.

it’s perfect

permalink
report
parent
reply
20 points

If your system hasn’t been upgraded to 64-bit types by 2038, you’d deserve your overflow bug

permalink
report
parent
reply
1 point

I know, but it’s not standard anywhere in the world.

permalink
report
parent
reply
2 points

I thought that’s what datetime was based off of, tbh.

permalink
report
parent
reply
3 points

I love the word “Epochalypse”, from the wiki page you linked

permalink
report
parent
reply
5 points

Give it a few more decades

permalink
report
parent
reply
29 points
*

LOL whenever I have to work with DateTime systems that try to account for every possibility (and fail trying) I am reminded that in some disciplines, it’s acceptable to simplify drastically in order to do ‘close enough’ work.

I mean, if spherical cows are a thing because that makes the math of theoretical physics doable, why not relativity-free or just frame-constant date-time measures that are willing to ignore exotic edge cases like non-spherical livestock?

permalink
report
reply
3 points

Because “relativity” isn’t even close to your biggest problem with time. The way we communicate time changes historically, unpredictably, without obvious record. The only way to know what time you’re talking about is to know exactly how you got your information. What location, measured at what time relative to recorded changes in the local time zone, with how much drift relative to the last time you synchronized to which ntp server, and so on. These things easily account for hours or days of error, not just nanoseconds.

permalink
report
parent
reply
1 point
Deleted by creator
permalink
report
reply
54 points
13 points

Thank you, but I gave up halfway through the list.

permalink
report
parent
reply
4 points

Epoch is your friend, or use UTC. At least that’s my layman reasoning. I have no challenges working with DateTime except when I don’t know the underlying conditions applied from the source code.

permalink
report
parent
reply
8 points

I got to “The day before Saturday is always Friday” and I was like waaaa?

permalink
report
parent
reply
8 points

I thought it is about when Julian calendar was dropped in favour of Gregorian, but that’s not it:

Thursday 4 October 1582 was followed by Friday 15 October 1582

permalink
report
parent
reply
3 points

This post made my head hurt

permalink
report
parent
reply
10 points

I really wish that list would include some explanations about why each line is a falsehood, and what’s actually true. Particularly the line:

The software will never run on a space ship that is orbiting a black hole.

If the author has proof that some software will run on a space ship that is orbiting a black hole, I’d be really interested in seeing it.

permalink
report
parent
reply
12 points

Technically isn’t the Earth itself a sort of space ship which is orbiting (…a star which is orbiting…) the black hole at the center of the Milky Way galaxy? Not really close enough for time dilation to be a factor, but still.

permalink
report
parent
reply
7 points

All links to the original article are dead and even archive.org doesn’t have a capture either. I guess the argument is along the lines of “it might not be relevant, when you’re scripting away some tasks for your small personal projects, but when you’re working on a widely used library or tool - one day, it might end up on a space vessel to explore whatever.”

E.g. my personal backup script? Unlikely. The Linux kernel? Somewhat plausible.

permalink
report
parent
reply
2 points
*

Well in a very strict sense one can’t really say “never” (unless you can see into the Future), but it’s probably safe to go along with “It’s highly unlikelly and if it does happen I’ll fix it or will be long dead so won’t care”.

permalink
report
parent
reply
2 points

It’s a programmer thing. As you’re typing the code, you may suddenly realize that the program needs to a assume certain things to work properly. You could assume that time runs at a normal rate as opposed to something completely wild when traveling close to the speed of light or when orbiting a black hole.

In order to keep the already way too messy code reasonably simple, you decide that the program assumes you’re on Earth. You leave a comment in the relevant part of the code saying that this part shouldn’t break as long as you’re not doing anything too extreme.

permalink
report
parent
reply
8 points

Does anyone know what is untrue about “Unix time is the number of seconds since Jan 1st 1970.”?

permalink
report
parent
reply
28 points
*

When a leap second happens, unix time decreases by one second. See the section about leap seconds here: https://en.m.wikipedia.org/wiki/Unix_time

As a side effect, this means some unix timestamps are ambiguous, because the timestamps at the beginning and the end of a leap second are the same.

permalink
report
parent
reply
4 points

It might be more accurate to say that Unix time is the number of days since Jan 1st, 1970, scaled by 24×60×60. Though it gets a bit odd around the actual leap second since they aren’t spread over the whole day. (In some ways that would be a more reasonable way to handle it; rather than repeating a second at midnight, just make all the seconds slightly longer that day.)

permalink
report
parent
reply
10 points

This one is good (or evil, depends on how you see it):

Human-readable dates can be specified in universally understood formats such as 05/07/11.

permalink
report
parent
reply
9 points

That one’s really good.

Which one is it?

  • July 5th 2011
  • May 7th 2011
  • July 11th 2005
  • November 7th 2005

And is it 2011/2005 or rather 1911/1905, 1811/1805,…?

permalink
report
parent
reply
4 points

That’s me in the bottom right corner over there.

permalink
report
reply
1 point

Is it you in the bottom right spotlight over there?

permalink
report
parent
reply
1 point

Looks like they’ve lost something.

permalink
report
parent
reply

xkcd

!xkcd@lemmy.world

Create post

A community for a webcomic of romance, sarcasm, math, and language.

Community stats

  • 1.7K

    Monthly active users

  • 258

    Posts

  • 5.8K

    Comments

Community moderators