bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DST bug in touch utility


From: Bob Proulx
Subject: Re: DST bug in touch utility
Date: Thu, 3 Dec 2009 23:35:35 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

Please take care to make sure the mailing list is included in your
reply so that others may share in the discussion.  You can do this by
using the reply-to-mailing-list function.  Or lacking that use
reply-to-all.  Thanks.

> Thanks for the reply. Curiously, the --help indicates that I should
> report bugs to:
> address@hidden

Yes, well, that is the upstream address.  It is a philosophical
dilemma for porters.  Do they change it or do they leave it?  There
are pros and cons to it either way.  And for the upstream it is also a
philosophical problem as to how much support do you provide for ports
to other operating systems.  It is good to make them available on as
many platforms as possible.  But obviously the main goal is to support
the GNU Operating System.

  http://www.gnu.org/gnu/gnu-history.html

The non-native ports are, well, not the native environment and
compromises have to be made there.  If the environment doesn't support
the functionality then it just can't work there.

> Anyway, the --version indicates the following:
> C:\Documents and Settings\Cesar>touch --version
> touch (GNU coreutils) 5.3.0

That release 5.3.0 from 2005-01-08 is pretty well aged now.  You might
consider looking to see if a newer version is available.  The problem
may have already been noticed by someone and gotten fixed by now.  It
might not too but after five years it would be good to sync up a
little newer anyway.  The oldest I am using is 6.10 from 2008-01-22.

Eric's reply (the Cygwin maintainer) is almost certainly close to the
mark about the root cause of the problem.  I didn't think to ask about
the filesystem type.

Bob


Cesar Mugnatto wrote:
> 
> Hi Bob,
> 
>  
> 
> Thanks for the reply. Curiously, the --help indicates that I should report 
> bugs to:
> 
>  
> 
> address@hidden
> 
>  
> 
> Anyway, the --version indicates the following:
> 
>  
> 
> ===========================================================
> 
> C:\Documents and Settings\Cesar>touch --version
> touch (GNU coreutils) 5.3.0
> Written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and 
> Randy S
> mith.
> 
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> C:\Documents and Settings\Cesar>
> 
> ===========================================================
> 
>  
> 
>  
> 
> and just for the sake of reference...
> 
>  
> 
>  
> 
> ===========================================================
> 
> C:\Documents and Settings\Cesar>touch --help
> Usage: touch [OPTION]... FILE...
> Update the access and modification times of each FILE to the current time.
> 
> Mandatory arguments to long options are mandatory for short options too.
>   -a                     change only the access time
>   -c, --no-create        do not create any files
>   -d, --date=STRING      parse STRING and use it instead of current time
>   -f                     (ignored)
>   -m                     change only the modification time
>   -r, --reference=FILE   use this file's times instead of current time
>   -t STAMP               use [[CC]YY]MMDDhhmm[.ss] instead of current time
>   --time=WORD            change the specified time:
>                            WORD is access, atime, or use: equivalent to -a
>                            WORD is modify or mtime: equivalent to -m
>       --help     display this help and exit
>       --version  output version information and exit
> 
> Note that the -d and -t options accept different time-date formats.
> 
> Report bugs to <address@hidden>.
> 
> C:\Documents and Settings\Cesar>
> 
> ===========================================================
> 
> 
>  
> > Date: Thu, 3 Dec 2009 22:15:48 -0700
> > From: address@hidden
> > To: address@hidden
> > CC: address@hidden
> > Subject: Re: DST bug in touch utility
> > 
> > Cesar Mugnatto wrote:
> > > When using:
> > > touch.exe -c -t 200910030001 "filename.ext"
> > > (or for that matter, any date that falls within Daylight Saving
> > > Time) and the date on which the touch command was issued is in
> > > Standard Time (for example today's date Dec. 3, 2009), the file
> > > "filename.ext" is touched with an incorrect date.
> > 
> > Thank you for your bug report. I can see by your filename touch.exe
> > that you are not using a native version of GNU touch but one of the
> > ports from GNU to MS. What port are you using? What is the version
> > of it? What timezone are you using?
> > 
> > You can get the version this way:
> > 
> > touch --version
> > 
> > > Instead of being assigned the date
> > > Oct. 3, 2009 12:01 AM
> > > (what the user might expect)
> > > it is assigned instead
> > > Oct. 2, 2009 11:01 PM
> > 
> > I cannot recreate this behavior with the upstream native version of
> > GNU touch.
> > 
> > $ touch -t 200910030001 filename.ext
> > $ ls -og --full-time filename.ext
> > -rw-rw-r-- 1 0 2009-10-03 00:01:00.000000000 -0600 filename.ext
> > 
> > > (incorrect even if the we subtract a sufficient number of days in
> > > increments of 24 hours from the current date in Standard Time until
> > > we reach the touch date in Daylight Saving Time, which would result
> > > in Oct. 3, 2009 1:01 AM )
> > 
> > Yes, looks nasty. But it appears to be in the port to MS and not in
> > the upstream. That means that this bug needs to be reported to the
> > party responsible for the port. Thank you for taking the time to
> > report the problem though. Unfortunately if it isn't in the native
> > GNU code then there isn't anything we can do about it here. It will
> > have to go to the party responsible for the MS port.
> > 
> > Bob
>                                         
> _________________________________________________________________
> Windows Live: Make it easier for your friends to see what you’re up to on 
> Facebook.
> http://go.microsoft.com/?linkid=9691816




reply via email to

[Prev in Thread] Current Thread [Next in Thread]