Is it possible to set the date on a Linux machine to the year 2040?

Posted by Daryl Spitzer on Server Fault See other posts from Server Fault or by Daryl Spitzer
Published on 2010-06-18T00:02:36Z Indexed on 2010/06/18 0:13 UTC
Read the original article Hit count: 522

Filed under:
|
|
|
|

I need to be able to set the date on Ubuntu (8.04.4 LTS) to the year 2040 (to test something that isn't relevant to this question). Is that possible?

I can run:

$ sudo date -s "15 JAN 2038 18:00:00"
Fri Jan 15 18:00:00 PST 2038

...but:

$ sudo date -s "15 JAN 2039 18:00:00"
date: invalid date `15 JAN 2039 18:00:00'

Is the limit somewhere in 2038 (or prior to Jan. 15, 2039)? Does this change with different versions of Linux?

© Server Fault or respective owner

Related posts about linux

Related posts about limit