I'd like to create a file with an invalid created/modified/accessed timestamp to use in unit tests to ensure that my application can handle files with invalid timestamps. It's a Windows application written in C# that could run on both NTFS and FAT32 filesystems.
Asked
Active
Viewed 607 times
2
-
Also, please try superuser.com. It's a good place to find tools for changing windows file timestamps! And, what do you mean by "invalid" timestamp? – bdhar Oct 07 '10 at 12:13
-
@bdhar A date and time before 12:00 midnight January 1, 1601 C.E. UTC – Tom Robinson Oct 07 '10 at 12:15
-
oh.. i m not sure. Interesting question though :) – bdhar Oct 07 '10 at 12:18
4 Answers
2

Community
- 1
- 1

Tom Robinson
- 8,348
- 9
- 58
- 102
-
That link is probably as stable as this site, but it would still be nice with a summary. – Peter Mortensen Mar 28 '17 at 15:29
1
If you are looking for a timestamp editor, I found this one useful.

bdhar
- 21,619
- 17
- 70
- 86
-
Thanks, this is useful though doesn't seem to let you set invalid dates – Tom Robinson Oct 07 '10 at 12:44
1
Have a look at the opensource 'Touch for Windows'.
It updates the dates associated with a file to whatever you want it to be. It can change access, modification and creation dates. You as a user can update them independently of each other, you can update them with any possible date. Dates can be now, user specified or copied from another file. If you try to touch a file which does not exist, this command will create it for you (empty of course).
Have a look and download the source here.

James - built2order
- 61
- 3
-
Thanks, this is useful though doesn't seem to let you set invalid dates as it still uses the Win32 API – Tom Robinson Oct 19 '10 at 08:45
0
Get the NuGet package MySql.Data in version 8.0.18 ( from here). On my NTFS filesystem, this little dll acts a bit weird.

Michael Wirth
- 36
- 1
- 4