Is it possible to set the date on a Linux machine to the year 2040?
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).