r/ProgrammerHumor • • May 17 '21

Timezone Support

Post image
22.3k Upvotes

460 comments sorted by

View all comments

Show parent comments

445

u/[deleted] May 17 '21

Weird to put a semi serious reaction here, but they wouldn't for long. The length of a day on Mars is very different then one on earth. Assuming they'd want to keep 12:00 as the time when the sun is at it's highest point, that would be out of sync almost immediately.

Eh, that's future us's problem. But they'll figure it out.

Also, maybe Earth-based servers will use Earth time zones. Who knows? Maybe the Mars-based computers will use UTC for communication with Earth.

295

u/ech0_matrix May 17 '21

Maybe the unix clock will rollover before that happens. Eh, that's future us's problem.

171

u/BackmarkerLife May 17 '21

Which everyone will wait until 2035/36 to actually do something about.

151

u/SexyMonad May 17 '21

We call it “job security”.

0

u/[deleted] May 18 '21

[deleted]

15

u/northrupthebandgeek May 18 '21

There's a lot of embedded 32-bit stuff floating around. Hell, I don't think there are any 64-bit processors on Mars at all (unless the Zhurong rover has one; can't find any details on what CPU they used for it).

6

u/Eyeownyew May 18 '21

The entire US banking industry runs on software from the 1960s-1980s 😬 I don't mean one company. The transactions, the ledgers, international wire transfers, all of it. It's one of the reasons that most banks have low quality apps & websites, that tech is a completely different tech stack from their financial processing

3

u/[deleted] May 18 '21

Then they'll have to do what one aussie bank did.

Rewrite it from scratch.

It was surprisingly fairly smooth and "only" cost a bil or so.

0

u/[deleted] May 18 '21

[deleted]

3

u/Rainmaker526 May 18 '21

That's simply not true. For example, our backup software, running on Windows, refused to schedule anything beyond the year 2038 until a fairly recent patch.

3

u/hego555 May 18 '21

I think the issue is for really old software.

→ More replies (4)

1

u/crozone May 18 '21

Eh, that's future us's problem.

The few systems still on 32 bit timestamps are probably quite entrenched and expensive to replace.

Sounds like a perfect way to make a lot of money contracting to desperate companies that need to swap them out last minute 😎

→ More replies (1)

97

u/[deleted] May 17 '21 edited May 17 '21

Datetime on Earth is insanely bloated with millenia-old compatibility. For example; leap years, 29 days in February, weeks misaligned with months etc.

If Martian colonists created a new, simpler time system based on seconds, then they can leverage the existing Unix time. Converting between Mars and Earth would just involve Unix time as an intermediate

44

u/[deleted] May 17 '21

Unix time would be the basis regardless of how they did it. Its worked since 1970, why stop now...

Literally just get the day that the systems go online as day 0 Martian calendar and work out the specific issues later.

Unfortunately a Martian Solar Day (Sol) is 24hrs 39mins 35seconds.

So not exactly a nice even conversion from Earth time.

Unfortunately we can't just change the length of a second to make it easier.

It's just that ~86,400s in one day isn't a very compatible transformation with 88,775s in one Martian Sol.

→ More replies (1)
→ More replies (2)

15

u/CodyTrey93 May 17 '21

Once there's people on Mars, shouldn't UTC, change to GTC for coordinated global time?

4

u/Velvet-Thunder_ May 17 '21

They’ll figure it out by rewriting it in Rust

1

u/[deleted] May 18 '21

Haha exactly, are we fucking over future us by not solving these problems beforehand? Absolutely. Can they do anything to stop us from being lazy? Hell no

1

u/T-T-N May 18 '21

Earth Local => Earth based UTC => universal unix timestamps => Mars based UTC => Mars Local

You just have 4 conversions to test

1

u/[deleted] May 18 '21

Leave a few "comments" in the code about needing to fix cross-planet timezone implementations.

By that, I mean obscurely named variables named aabc and aabd, with a comment saying "this is for timezone stuff"

1

u/funnyflywheel May 18 '21

Eh, that’s future us’s problem.

In the future, we’ll likely be using stardates.

1

u/selfishdevotion May 18 '21

If I could upvote twice for "let another developer deal with it" - I absolutely would.

1

u/MartIILord May 18 '21

I live my life in seconds from epoch if they just upgrade the integer to fit a few hundred of years it ain't my problem. Computers also use this. XD it is more of an locale problem of displaying the said seconds as something human undestandable also known as an locale.

1

u/BlueWoff May 18 '21

Servers should always use UTC. Always. Only clients, which are accessed by users, would deal with time zones.

1

u/Additional-Ad1471 May 18 '21

Actually this kind of timezone they already cover in MARTIAN movie. The martian use SOL as Mar-day. A Martian day (referred to as “sol”) is approximately 40 minutes longer than a day on Earth.