Das hier macht genau, was Du willst - mit ein bisschen Änderung:
http://home.arcor.de/baier/Data/Glob...lerSources.zip
Vorsicht:
2147483647
The largest positive value of a signed integer on a 32 bit operating system. The data type time_t which is used on operating systems including UNIX and Windows is a signed integer. On January 19, 2038 at 3:17:07 GMT, the time_t values on 32 bit machines will be maxed out and set to -2147483647. This will make clocks set to December 13, 1901 20:45:52 GMT.
The world of time will end on January 19, 2038 at 3:17:07 GMT, otherwise known as 2147483647.