Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to create a file with an invalid created/modified/accessed timestamp. To be invalid it should be a date and time before 12:00 midnight January 1, 1601 C.E. UTC

share|improve this question
Why would you want to do this? – Rowland Shaw Oct 7 '10 at 12:28
So that I can test that the application I'm writing can handle corrupt timestamps gracefully. – tjrobinson Oct 7 '10 at 12:30
up vote 3 down vote accepted

Look for a tool called Timestomp

The software's goal is to allow for the deletion or modification of time stamp-related information on files.

share|improve this answer

This is not possible.

File time is used in Windows API through the FILETIME Structure, described as:

Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).

As negative values are not supported, the above date is the starting limit.

Conclusion: Your code which tests for earlier dates will never be challenged.

share|improve this answer
The "touch" command in Linux can create such a file, but under Windows it is recognized as being created today. (Tested with FAT32 Flashdrive and Win XP) – agporwfnz29 Oct 7 '10 at 14:03

Your Answer


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.