timestamp_2038_test_double.Exe
Previous  Next

QChartist is ready for 2038 ! Date and time algorithms adapted.
Data source is ready for 2038

What will happen to 32-bit systems in 2038?
The 2038 problem refers to the time encoding error that will occur in the year 2038 in 32-bit systems. This may cause havoc in machines and services that use time to encode instructions and licenses. The effects will primarily be seen in devices that are not connected to the internet.

What will happen to timestamp after 2038?
Consequently, if a signed 32-bit integer is used to store Unix time, the latest time that can be stored is 231 - 1 (2,147,483,647) seconds after epoch, which is 03:14:07 on Tuesday, 19 January 2038. ... From here, systems will continue to count up, towards zero, and then up through the positive integers again.

Why is 2038 a problem?
If you have read How Bits and Bytes Work, you know that a signed 4-byte integer has a maximum value of 2,147,483,647, and this is where the Year 2038 problem comes from. The maximum value of time before it rolls over to a negative (and invalid) value is 2,147,483,647, which translates into January 19, 2038.

QChartist uses double variables to store timestamps

What is a double variable in Visual and RQ Basic?
A Double is 8 bytes. It is a value type. It stores numeric values that have a decimal place. It stores extremely small and extremely large numbers. Doubles are often used in VB.NET programs that also use the Math type.

For example:

long 8 bytes or (4bytes for 32 bit OS) -9223372036854775808 to 9223372036854775807
unsigned long   8 bytes                 0 to 18446744073709551615

Consequently, if a signed 32-bit integer is used to store Unix time, the latest time that can be stored is 2^31 - 1 (2,147,483,647) seconds after epoch, which is 03:14:07 on Tuesday, 19 January 2038.