X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Philippe Subject: Re: 1.5.25: bug in touch statement Date: Sun, 15 May 2011 12:09:01 +0000 (UTC) Lines: 55 Message-ID: References: <415512198 DOT 1687271301267190457 DOT JavaMail DOT root AT zimbra6-e1 DOT priv DOT proxad DOT net> <277043603 DOT 1687291301267204451 DOT JavaMail DOT root AT zimbra6-e1 DOT priv DOT proxad DOT net> <871v1scd5c DOT fsf AT navakl084 DOT mitacad DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Toby Allsopp navman.co.nz> writes: > > On Mon, Mar 28 2011, andre wrote: > > > Hi, > > > > I can't do on cygwin 1.5.25 : > > $ touch -t 201103270200 file > > touch: format de date invalide `201103270200' > > > > nor this equivalent : $touch -t 03270200 file > > > > It's very surprising , but ... > > If I change 27 for 28 it's OK - idem if i change 2011 by 2010... > > I would guess this has something to do with the transition to daylight > saving time, which happened at 0200 on 2011-03-27. This means that the > time you are specifying didn't ever exist (in your local time zone) > because 0200 became 0300. > > Perhaps you can get what you want by specifying the time in UTC? > > Regards, > Toby. > > I've found an interesting behaviour with this command on my Windows 7 64bits system. It seems that there is a bug, or the we should change the documentation... But I can get around with the following date/time format: MMddhhmmyy where MM: Month (01-12) dd: day (01-31) hh: hours (00-23) mm: minutes (00-59) yy: 2 digit year yy is interesting. 00 to 37 yields 2000 to 2037. 70 to 99 yields 1970 to 1999. 38 to 69 leaves the date unchanged, even for new correct time, day or month. hh has another twist. It will change time an hour MORE than what specified on the command line. If you want the file date to be 9AM, you enter 08. Another twist, if you specify 1231235511, the file date will be 2012 dec 31, 00h55, an hour later than the one specified. Philippe -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple