Live data from Hacker News

Let's restart counting Unix timestamp to from 2020

news.ycombinator.com

1–10 of 22 posts

Let's restart counting Unix timestamp to from 2020

#1
Old counting start date: Jan 01 1970 01:00:00 GMT+0100

New counting start date: Jan 1 2020 00:00:00 UTC+0000

Example in Dev Tools how to get the new epoch time

const newBeginning = new Date('Jan 1 2020 00:00:00 UTC+0000')

const newEpoch = Date.now() - newBeginning.getTime()

console.log('New epoch timestamp', newEpoch)

Re: Let's restart counting Unix timestamp to from 2020

#5

Why?

We're slowly running out of time in 32 bits. It would be good to have another standard measure of time that fits in 32 bits and is agreed upon long before the old one expires

How will we know which way to decode time data, then? You can't use timestamps, and adding an extra signing bit defeats the purpose.

Re: Let's restart counting Unix timestamp to from 2020

#6

Why?

We're slowly running out of time in 32 bits. It would be good to have another standard measure of time that fits in 32 bits and is agreed upon long before the old one expires

It sounds like the problem being described is not that Unix epoch starts in 1970 but rather that it's 32 bit. Perhaps there is a way to make this 64 bits and maintain some backwards compatibility? I am not a proper developer so perhaps someone could postulate whether or not this would be feasible.

[Edit] Answering my own question it appears some systems have already addressed this by moving to 64 bit time [1] thus kicking the can down the road 292 billion years in both directions.

[1] - https://en.wikipedia.org/wiki/Unix_time

Re: Let's restart counting Unix timestamp to from 2020

#7

And why not 2000 while you're at it, to keep it even?

Starting a new epoch every 50 years is kind of round and leaves plenty of space in between. 1970 is epoch 1, so this one will be epoch 2 and the next one in 2070 will be epoch 3 etc. It will be easy in a few hundred years to know which epoch is the current one. 2020 not 2000 for backwards compatibility to keep the intervals even for the new epochs, because the first one is already baked everywhere so we can't switch it to 1950.

Re: Let's restart counting Unix timestamp to from 2020

#10

Earlier quoted context omitted.

We're slowly running out of time in 32 bits. It would be good to have another standard measure of time that fits in 32 bits and is agreed upon long before the old one expires

It sounds like the problem being described is not that Unix epoch starts in 1970 but rather that it's 32 bit. Perhaps there is a way to make this 64 bits and maintain some backwards compatibility? I am not a proper developer so perhaps someone could postulate whether or not this would be feasible. [Edit] Answering my own question it appears some systems have already addressed this by moving to 64 bit time [1] thus ki…

Sure, using 64bits is one way but many devices i.e. IOT don't need 64bit support. 64 bit will definitely be a standard, but a concurrent standard can be implemented to allow keeping the time in 32 bits. Starting a new epoch every 50 years could be one. So starting from 1 Jan 2020 we're in epoch 2 now
Post reply on HN