| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Original-To: | cygwin AT cygwin DOT com |
| Delivered-To: | cygwin AT cygwin DOT com |
| DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org 20037394D88D |
| Authentication-Results: | sourceware.org; dmarc=none (p=none dis=none) |
| header.from=SystematicSw.ab.ca | |
| Authentication-Results: | sourceware.org; |
| spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca | |
| X-Authority-Analysis: | v=2.4 cv=MaypB7zf c=1 sm=1 tr=0 ts=60770952 |
| a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17 | |
| a=IkcTkHD0fZMA:10 a=TImcKGuyeGIbufSLrCcA:9 a=QEXdDO2ut3YA:10 | |
| To: | cygwin AT cygwin DOT com |
| References: | <603461978 DOT 103298236 DOT 1618396574434 DOT JavaMail DOT root AT zimbra76-e14 DOT priv DOT proxad DOT net> |
| From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca> |
| Organization: | Systematic Software |
| Subject: | Re: Cygwin DLL 3.2.0 (W10) Problem with touch (8.26) for old dates < |
| 1970 | |
| Message-ID: | <2b1d2695-9339-4673-47c6-341772be79ff@SystematicSw.ab.ca> |
| Date: | Wed, 14 Apr 2021 09:25:05 -0600 |
| User-Agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 |
| Thunderbird/78.9.1 | |
| MIME-Version: | 1.0 |
| In-Reply-To: | <603461978.103298236.1618396574434.JavaMail.root@zimbra76-e14.priv.proxad.net> |
| X-CMAE-Envelope: | MS4xfMObT3DumTlASL2jxhL6a05AjemFs5bmSLtYxeaDmjK5i8hX9K9+EPZxMtzKe7vqSQFcHO1cXXlpU8ZNtw4BCF8Tp46POPGLsCnAThgwGAmhQ0S1NU9t |
| w2qy2addQ2jiMRJ3wrpCM6nA64CbJ7DTYB9J4dz3Ev7xPrRpY76+Kk4bRC0Sv3bEaVHACXa8bOYQN4520QHj9S7Z7PA0JEnknPc= | |
| X-Spam-Status: | No, score=0.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, |
| KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, NICE_REPLY_A, | |
| RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, | |
| RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, | |
| TXREP autolearn=no autolearn_force=no version=3.4.2 | |
| X-Spam-Checker-Version: | SpamAssassin 3.4.2 (2018-09-13) on |
| server2.sourceware.org | |
| X-BeenThere: | cygwin AT cygwin DOT com |
| X-Mailman-Version: | 2.1.29 |
| List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
| List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
| List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
| List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
| Reply-To: | cygwin AT cygwin DOT com |
| Errors-To: | cygwin-bounces AT cygwin DOT com |
| Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com> |
| X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id 13EFPFbR015310 |
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.]
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |