The 2038 Problem

Eren Suner
2 min readMar 4, 2020

--

Do you remember the ’90s? When people feared the year 2000 would break their computers. I don’t. Because I wasn’t around, but there’s another similar problem that I (hopefully) will remember. But before we get to that problem, let’s talk about how decentralized applications store time.

Computers count time in a variety of methods. The most common one being the number of seconds from January 1st, 1970 to the given date/time. This is called the Unix time. Which is usually stored in a 32-bit integer in decentralized applications in order to save operating costs.

2147483648 is the number of seconds you can put in a 32-bit integer. 31622400 is roughly the number of seconds in a year. It makes about 68 years you can put in a 32-bit integer, hence the problem of 2038.

The Stupidity

A 32-bit integer accounts for both positive and negative integers, but time only moves forward and it is positive. By making that 32-bit int signed (can be both positive and negative), you’re losing about 68 years’ of optimized less-money-charging contracts that appeal to customers better my developer friend. Make it unsigned, don’t lose customers & gain trust by not failing this problem.

About Me

I’m a 16-year-old blockchain enthusiast working on cool projects. Follow me on Twitter @ErenSuner2. Check out my website.

--

--

No responses yet