Let's restart counting Unix timestamp to from 2020

2 points by touchpadder ↗ HN
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)

1 comment

[ 4.8 ms ] story [ 15.4 ms ] thread
For simple devices like IOT etc to be able to keep using the short 32bit date format. Also for databases that may store dates as integers to save the space. There are plenty of cases that may want to keep using a short 32bit date format. After 2038 anyone will be able to count 32bit time from any arbitrary point of time so before that happens I'm simply suggesting a standardized way of reliably restarting it for centuries to come