public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.5.25: bug in touch statement
       [not found] <415512198.1687271301267190457.JavaMail.root@zimbra6-e1.priv.proxad.net>
@ 2011-03-28  5:26 ` andre
  2011-03-28 14:43   ` Toby Allsopp
  0 siblings, 1 reply; 7+ messages in thread
From: andre @ 2011-03-28  5:26 UTC (permalink / raw)
  To: cygwin

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... 

Globally, it's working on 99.99% of cases. 

More surprising, the same problem exists on ubuntu 10.10. !!! 
touch: invalid date format `201103270200' 

Some patterns are only concerned! 

I am disapointed to raise such problem after thousands and thousands uses of this statement. 

-- Andre -- 

--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 1.5.25: bug in touch statement
  2011-03-28  5:26 ` 1.5.25: bug in touch statement andre
@ 2011-03-28 14:43   ` Toby Allsopp
  2011-05-15 12:20     ` Philippe
  0 siblings, 1 reply; 7+ messages in thread
From: Toby Allsopp @ 2011-03-28 14:43 UTC (permalink / raw)
  To: cygwin

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.


--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 1.5.25: bug in touch statement
  2011-03-28 14:43   ` Toby Allsopp
@ 2011-05-15 12:20     ` Philippe
  2011-05-15 12:25       ` Philippe
  2011-05-15 17:31       ` Christopher Faylor
  0 siblings, 2 replies; 7+ messages in thread
From: Philippe @ 2011-05-15 12:20 UTC (permalink / raw)
  To: cygwin

Toby Allsopp <Toby.Allsopp <at> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 1.5.25: bug in touch statement
  2011-05-15 12:20     ` Philippe
@ 2011-05-15 12:25       ` Philippe
  2011-05-15 12:52         ` Buchbinder, Barry (NIH/NIAID) [E]
  2011-05-15 17:31       ` Christopher Faylor
  1 sibling, 1 reply; 7+ messages in thread
From: Philippe @ 2011-05-15 12:25 UTC (permalink / raw)
  To: cygwin

Philippe <jwphubert <at> gmail.com> writes:

> I've found an interesting behaviour with this command on my Windows 7 64bits 
> system.  It seems that there is a bug, or that 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
> 
> 
Sorry, little mistake.  On my previous post, your should read:

"Another twist, if you specify 1231235511, the file date will be 2012 jan 01, 
00h55, an hour later than the one specified."





--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: 1.5.25: bug in touch statement
  2011-05-15 12:25       ` Philippe
@ 2011-05-15 12:52         ` Buchbinder, Barry (NIH/NIAID) [E]
  0 siblings, 0 replies; 7+ messages in thread
From: Buchbinder, Barry (NIH/NIAID) [E] @ 2011-05-15 12:52 UTC (permalink / raw)
  To: cygwin, 'Philippe'

Philippe sent the following at Sunday, May 15, 2011 8:25 AM
>Philippe <jwphubert <at> gmail.com> writes:
>> I've found an interesting behaviour with this command on my Windows 7 64bits
>> system.  It seems that there is a bug, or that 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
>> the command line.  If you want the file date to be 9AM, you enter 08.
>> twist, if you specify 1231235511, the file date will be 2012 dec 31, 00h55,
>> hour later than the one specified.
>
>on Another an Sorry, little mistake. On my previous post, your should
>read:
>
>"Another twist, if you specify 1231235511, the file date will be 2012
>jan 01, 00h55, an hour later than the one specified."

The yy works that way because the UNIX epoch.  Time is measured in seconds and
encoded as a 32 bit integer, where 0 = 1970-01-01 00:00:00 UTC.  This scheme
runs out of bits at 2038-01-19 03:14:07 UTC.

See
  <http://en.wikipedia.org/wiki/Unix_time>
and
  <http://en.wikipedia.org/wiki/Year_2038_problem>

I don't know about the hours, but a one hour difference always suggests to me a
problem due to summer time, though it might have something to do with time
zones.  Add to that how interaction with Windows and how it handles daylight
savings time and time zones.

Good luck,

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.


--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 1.5.25: bug in touch statement
  2011-05-15 12:20     ` Philippe
  2011-05-15 12:25       ` Philippe
@ 2011-05-15 17:31       ` Christopher Faylor
  1 sibling, 0 replies; 7+ messages in thread
From: Christopher Faylor @ 2011-05-15 17:31 UTC (permalink / raw)
  To: cygwin

On Sun, May 15, 2011 at 12:09:01PM +0000, Philippe wrote:
>Toby Allsopp <Toby.Allsopp <at> navman.co.nz> writes:
>> On Mon, Mar 28 2011, andre wrote:
>> > 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?
>> 
>> 
>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:

Cygwin 1.5.25 is not going to be changed.  What you see is what you get.

--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 1.5.25: bug in touch statement
       [not found] <615560551.1925761301335739415.JavaMail.root@zimbra6-e1.priv.proxad.net>
@ 2011-03-28 19:25 ` andre
  0 siblings, 0 replies; 7+ messages in thread
From: andre @ 2011-03-28 19:25 UTC (permalink / raw)
  To: cygwin



On Mon, Mar 28 2011, Toby Allsop 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. 

You are surely right. 

I could'nt imagine it was a bug! but I am also missing of imagination... 

Thanks for the answer. 

-- Andre -- 

--
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-15 17:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <415512198.1687271301267190457.JavaMail.root@zimbra6-e1.priv.proxad.net>
2011-03-28  5:26 ` 1.5.25: bug in touch statement andre
2011-03-28 14:43   ` Toby Allsopp
2011-05-15 12:20     ` Philippe
2011-05-15 12:25       ` Philippe
2011-05-15 12:52         ` Buchbinder, Barry (NIH/NIAID) [E]
2011-05-15 17:31       ` Christopher Faylor
     [not found] <615560551.1925761301335739415.JavaMail.root@zimbra6-e1.priv.proxad.net>
2011-03-28 19:25 ` andre

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).