Unix Timestamp is reaching the end.

Julyanto Sutandang
3 min readFeb 21, 2021

32 bit of Unix Timestamp has been served since 1970 and it is going to an end, since the most coverage of the counter of seconds is year 2038. That is really not a problem since there are better solution, change from 32 bit into 64 bit data, and eliminate 2038 boundary and can cover the time and date until December 4th, 292,277,026,596; approximately. That really a great year, we hope our earth can pass until that year ;-)

There are no problem change the 32 bit timestamp data into a 64 bit one while we don’t have any problem of data format in our system, indeed we also should change the application vice versa. But…

When we don’t have any luxury to change the data storage (from 32 bit into 64 bit) or even worse we don’t want to change into 64 bit because of any reason.

One of the most reasonable reason is when the timestamp is a part of the key, that can be a license key, security key, or any data which communicate and quite handy, for example: we don’t need to hand over 64 digits data and type that into a system (yes, somehow there always some necessity, we know there are qr code). 32 bit of timestamp only occupying 8 hex digit, while 64 bit will use 16 hex digit only for timestamp.

One of the solution is to cut the information, eliminate the seconds and time, but we lose some information that won’t be a Unix Timestamp anymore. Other solution is to use this approach:

We know that our limit is 32 bit of data, then we try some approaches and we found that number of seconds in a year is at maximum: 31,622,400 and that is a bit less than 2²⁵ (33,554,432)

if the number of seconds in a year is occupying 25 bit of the data, then there are 7 bit left for the year information, it is: 128 years.

So, by dividing the bit into 2 section (year and seconds) we can increase the number of the year from 68 years (2038–1970) and since this is a new format we can start not from 1970, but can start from any year we wish, for example year 2000. If we start from year 2000 then the limitation year is 2127 and hopefully in those year we already had quantum computing, with huge data and AI with consciousness, so there no need to fix older software and perhaps everything will be changed into another very different technology.

This approach is trying to fix the limitation year of Unix Timestamp without changing or adding more data into current format, just a little bit change in the library to read and write the timestamp.

AAAA|AAAB|BBBB|BBBB|BBBB|BBBB|BBBB|BBBB

Where A is the bit year (0–127), and B is the bit second (number of seconds in a year)

That’s all folks, please leave a comment if you are interested in this ideas, thank you.

--

--

Julyanto Sutandang

Technopreneur, System Developer, System Optimization Expert, Open Source Enthusiasts, PostgreSQL Expert, run IT Solution Business in South East Asian