* Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970
[not found] <369474148.103071581.1618392198922.JavaMail.root@zimbra76-e14.priv.proxad.net>
@ 2021-04-14 10:36 ` akiki
2021-04-14 11:16 ` Thomas Wolff
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: akiki @ 2021-04-14 10:36 UTC (permalink / raw)
To: cygwin
Hi,
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970
2021-04-14 10:36 ` Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970 akiki
@ 2021-04-14 11:16 ` Thomas Wolff
2021-04-14 13:54 ` Lee
2021-04-14 15:25 ` Brian Inglis
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Wolff @ 2021-04-14 11:16 UTC (permalink / raw)
To: cygwin
Am 14.04.2021 um 12:36 schrieb akiki--- via Cygwin:
> Hi,
> 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 ...
The namespace of Unix/POSIX timestamps starts in 1970. Time before that
year does not exist.
> 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.
> --
> Problem reports: https://cygwin.com/problems.html
> FAQ: https://cygwin.com/faq/
> Documentation: https://cygwin.com/docs.html
> Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970
2021-04-14 10:36 ` Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970 akiki
2021-04-14 11:16 ` Thomas Wolff
@ 2021-04-14 13:54 ` Lee
2021-04-14 15:25 ` Brian Inglis
2 siblings, 0 replies; 4+ messages in thread
From: Lee @ 2021-04-14 13:54 UTC (permalink / raw)
To: akiki; +Cc: cygwin
On 4/14/21, akiki--- via Cygwin wrote:
> Hi,
> 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
Do you have the 32 bit cygwin installed? x86_64 Cygwin looks OK to me:
$ touch -m -t 190001011200.00 x
$ ls -l x
-rw-rw-rw- 1 Lee None 0 Jan 1 1900 x
$ uname -a
CYGWIN_NT-10.0 i3668 3.1.7(0.340/5/3) 2020-08-22 17:48 x86_64 Cygwin
Regards,
Lee
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970
2021-04-14 10:36 ` Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970 akiki
2021-04-14 11:16 ` Thomas Wolff
2021-04-14 13:54 ` Lee
@ 2021-04-14 15:25 ` Brian Inglis
2 siblings, 0 replies; 4+ messages in thread
From: Brian Inglis @ 2021-04-14 15:25 UTC (permalink / raw)
To: cygwin
On 2021-04-14 04:36, akiki--- via Cygwin wrote:
> 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.
What's your OS + version, Cygwin uname -srvmo, Windows filesystem (and
underlying if networked), time zone?
Please repeat touch tests, followed by ls -glo and --full-time if required.
I have timestamped some historical documents and images with no problems.
Works just fine for me on current Windows, Cygwin, NTFS back to Windows limits:
$ for ((y=1980;y>1580;y-=10)); do touch -t ${y}12312359.59 t && ls -glo t ||
echo $y; done
-rw-r--r--+ 1 1 Dec 31 1980 t
-rw-r--r--+ 1 1 Dec 31 1970 t
-rw-r--r--+ 1 1 Dec 31 1960 t
-rw-r--r--+ 1 1 Dec 31 1950 t
-rw-r--r--+ 1 1 Dec 31 1940 t
-rw-r--r--+ 1 1 Dec 31 1930 t
-rw-r--r--+ 1 1 Dec 31 1920 t
-rw-r--r--+ 1 1 Dec 31 1910 t
-rw-r--r--+ 1 1 Dec 31 1900 t
-rw-r--r--+ 1 1 Dec 31 1890 t
-rw-r--r--+ 1 1 Dec 31 1880 t
-rw-r--r--+ 1 1 Dec 31 1870 t
-rw-r--r--+ 1 1 Dec 31 1860 t
-rw-r--r--+ 1 1 Dec 31 1850 t
-rw-r--r--+ 1 1 Dec 31 1840 t
-rw-r--r--+ 1 1 Dec 31 1830 t
-rw-r--r--+ 1 1 Dec 31 1820 t
-rw-r--r--+ 1 1 Dec 31 1810 t
-rw-r--r--+ 1 1 Dec 31 1800 t
-rw-r--r--+ 1 1 Dec 31 1790 t
-rw-r--r--+ 1 1 Dec 31 1780 t
-rw-r--r--+ 1 1 Dec 31 1770 t
-rw-r--r--+ 1 1 Dec 31 1760 t
-rw-r--r--+ 1 1 Dec 31 1750 t
-rw-r--r--+ 1 1 Dec 31 1740 t
-rw-r--r--+ 1 1 Dec 31 1730 t
-rw-r--r--+ 1 1 Dec 31 1720 t
-rw-r--r--+ 1 1 Dec 31 1710 t
-rw-r--r--+ 1 1 Dec 31 1700 t
-rw-r--r--+ 1 1 Dec 31 1690 t
-rw-r--r--+ 1 1 Dec 31 1680 t
-rw-r--r--+ 1 1 Dec 31 1670 t
-rw-r--r--+ 1 1 Dec 31 1660 t
-rw-r--r--+ 1 1 Dec 31 1650 t
-rw-r--r--+ 1 1 Dec 31 1640 t
-rw-r--r--+ 1 1 Dec 31 1630 t
-rw-r--r--+ 1 1 Dec 31 1620 t
-rw-r--r--+ 1 1 Dec 31 1610 t
-rw-r--r--+ 1 1 Dec 31 1600 t
touch: setting times of 't': Invalid argument
1590
$ for ((y=1600;y>1598;--y)); do touch -t ${y}12312359.59 t && ls -glo t || echo
$y; done
-rw-r--r--+ 1 1 Dec 31 1600 t
touch: setting times of 't': Invalid argument
1599
$ y=1600; for ((m=12;m>10;--m)); do touch -t ${y}${m}312359.59 t && ls -glo t ||
echo $y-$m; done -rw-r--r--+ 1 1 Dec 31 1600 t
touch: invalid date format ‘160011312359.59’
1600-11
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-14 15:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <369474148.103071581.1618392198922.JavaMail.root@zimbra76-e14.priv.proxad.net>
2021-04-14 10:36 ` Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < 1970 akiki
2021-04-14 11:16 ` Thomas Wolff
2021-04-14 13:54 ` Lee
2021-04-14 15:25 ` Brian Inglis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).