Already answered- thanks
Unix time memory problem
Collapse
X
-
In traditional UNIX implementations , time_t was an int, and the int was signed 32 bits. The count starts with 0:00:00 on January 1, 1970, universal time, as 0 seconds.
Therefore, the maximum value is (2^31−1) = 2,147,483,647, and it can handle 2,147,483,647 seconds (≒ 68 years, until 3:14:07 on January 19, 2038).
If the time_t type is changed to a signed 64-bit integer type, the maximum value is (2^63-1) = 9,223,372,036,8 54,775,807, and can be used up to 300 billion years in the Christian era.
Based on this, it is 36 bits to be able to count until the end of 3038.
Comment