r/ProgrammerHumor • • Feb 09 '18

Timezone Support

Post image
31.3k Upvotes

532 comments sorted by

View all comments

2.6k

u/[deleted] Feb 09 '18

A mean Martian solar day, or "sol", is 24 hours, 39 minutes, and 35.244 seconds.

The length of time for Mars to complete one orbit around the Sun is [...] about 686.98 Earth solar days, or 668.5991 sols.

Imagine how actually terrifying it would be to properly implement and support this and keep it in tune.

0

u/[deleted] Feb 09 '18

[deleted]

0

u/[deleted] Feb 09 '18

[deleted]

105

u/[deleted] Feb 09 '18

let's make the counter 64 bits this time

48

u/myrrlyn Feb 09 '18

i128 or bust

61

u/Lurker_Since_Forever Feb 09 '18

Signed 64 is already way way longer than the age of the universe up to this point. Like, in the trillions of years. More than we would ever need, but for real this time. None of that 640k of RAM bullshit.

19

u/myrrlyn Feb 09 '18

Let me rephrase: it should be a 128-bit-wide structure with fields in it, because "milliseconds since UNIX epoch" is an insufficient unit

2

u/proverbialbunny Feb 10 '18

Why?

8

u/marvin02 Feb 10 '18

Because they really love making "What is now + 10 seconds?" a 6 step problem.

2

u/myrrlyn Feb 10 '18

For one thing, it IS

What is Sunday March 11 2018 01:59:55 + 10?

Did Shakespeare and Cervantes die on the same day? Why do they have the same tombstone?

What's the current time plus ten?

How precise are we talking?

What's the current time?

What's this 32- or 64- bit integer with no other context mean?

Time is hard and it's not an integer. Pretending it is, is how we get in this mess.

→ More replies (0)
→ More replies (2)