bug-gnu-utils
[Top][All Lists]
Advanced

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

patch -Z not working if timestamp contains seconds > 59.5


From: Christian Franke
Subject: patch -Z not working if timestamp contains seconds > 59.5
Date: Wed, 07 Jun 2006 20:50:49 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0

Hi,

this is from a recent discussion in the cygwin mailing list:
(http://cygwin.com/ml/cygwin/2006-04/msg00699.html)

The patch options -Z and -T do not set filetime if the seconds part
of the timestamp is greater 59.5. This is because maketime() does
not handle denormalized times and returns an error on tm_sec = 60.

The bug could also be reproduced with patch 2.5.9 on Linux.

This patch is both a testcase and a quick fix for the issue:
http://cygwin.com/ml/cygwin/2006-04/txt00013.txt

It might be better to ignore the fractional part of the second at all.
This would make timestamps set by patch identical to those set by tar.

Thanks for any comment.

Christian





reply via email to

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