Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
You've done well, creating two new (and perfectly valid) tags for one question. :) –  John Gardeniers Jun 18 '10 at 3:04
add comment

1 Answer 1

up vote 10 down vote accepted

In systems that represent time as a 32bit interger, no. See http://en.wikipedia.org/wiki/Year_2038_problem for more details. Per that article, the latest time that most systems can represent is 03:14:07 UTC on Tuesday, 19 January 2038.

Note that most 64bit systems already use 64 bits to store time, so this won't be a problem once you upgrade (which you should do anyway so you can use all that RAM you bought in your new fast machine).

share|improve this answer
    
+1, I hope there aren't many 32 bit systems left when 2038 rolls around... –  Chris S Jun 18 '10 at 0:31
1  
@Chris, hope all you like but just remember there are still a great many 8 and 16 bit (non-PC) systems in use today, so don't expect too much. –  John Gardeniers Jun 18 '10 at 3:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.