Unix time memory problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JuliaSowa
    New Member
    • Jan 2020
    • 3

    #1

    Unix time memory problem

    Already answered- thanks
  • SioSio
    Contributor
    • Dec 2019
    • 272

    #2
    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

    • dev7060
      Recognized Expert Contributor
      • Mar 2017
      • 656

      #3
      The whole thread doesn't make sense without the original post. It isn't appropriate to remove the question. The discussion may benefit others as well. Same thing noticed here.

      Comment

      Working...