Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970
Wed Apr 14 10:36:14 GMT 2021

I encountered problems with the use of timestamps in cygwin. 
May be it's an old problem, I don't know, using essentially files "recently" created/modified. 

I want to say after 1970 No problem, but before ... 

To day: 
touch -m -t 190001011200.00 x gives touch: format de date « 190001011200.00 » incorrect 
touch -m -t 190101011200.00 x gives ok - with ls -l x: 
-rw-r--r-- 1 user group 0 1 janv. 1910 x 

touch used is well /bin/touch 

By comparison on Ubuntu 18 LTS 
touch -m -t 190001011200.00 x is correct 

I know, timestamps are managed differently in windows and linux. 

I see also with the new windows terminal with ubuntu 
On windows file, like /mnt/c/x (windows is mounted by linux) 
touch -m -t 190001011200.00 x ; echo $? gives 
0 #No error but timestamp is set to 1970-01-01 
On linux file as ~/x, it's correct; 

So, which confidence to have with cygwin about files of timestamp 19xx before 1970. 
May be it's ok after 1901. The answer is NOT. 
touch -m -t 190101011200.00 x gives sometimes format de date incorrect 

In some windows directories and more problematic, for a same directory, I don't understand why. 
May be due to embedded mounts. 

I hope to have been clear enough. 

Thanks for answers.

More information about the Cygwin mailing list