X-Spam-Check-By: sourceware.org Date: Tue, 25 Apr 2006 14:07:13 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5 Message-ID: <20060425120713.GO28583@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1FYLWN-0KKWBs0 AT fwd33 DOT aul DOT t-online DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1FYLWN-0KKWBs0@fwd33.aul.t-online.de> User-Agent: Mutt/1.4.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 On Apr 25 13:15, Christian Franke wrote: > Hi, > > the patch 2.5.8-8 options -Z and -T do not set filetime if the seconds > part > of the timestamp is greater or equal 59.5 > This is because maketime() does not handle "denormalized" times and > returns an error on tm_sec = 60. > The attached patch is a quick fix (and a testcase ;-) for this issue. > > Christian > diff -rup patch-2.5.8-8.orig/partime.c patch-2.5.8-8/partime.c > --- patch-2.5.8-8.orig/partime.c 2002-12-15 21:37:32.001000000 +0100 > +++ patch-2.5.8-8/partime.c 2006-04-25 12:14:59.797168500 +0200 > @@ -753,6 +753,8 @@ parse_pattern_letter (s, c, t) > int frac; > s = parse_decimal (s, 2, 0, 60, 1, &t->tm.tm_sec, &frac); > t->tm.tm_sec += frac; > + if (t->tm.tm_sec > 59) > + t->tm.tm_sec = 59; > } > break; This doesn't look like a Cygwin specific problem. I don't see this in patch-2.5.9, nor in any patched version from Fedora Core or SuSE Linux. Did you send this upstream? Can you tell me exactly where the problem happens which leads to this patch, please? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/