[Top][All Lists]

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

Re: it seems like a bug

From: The Wanderer
Subject: Re: it seems like a bug
Date: Wed, 01 Nov 2006 17:47:14 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922

Eric Blake wrote:

According to Mike Limansky on 10/31/2006 12:16 PM:

Hello all,

i use coreutils-5.94-r1 on gentoo linux. it's seems you have a bug
(possible in getdate.c).

# date -d "2006-10-29 + 1 day"
Sun Oct 29 23:00:00 MSK 2006

Not a bug.  This is due to daylight savings; the +1day adds 24 hours
and the lack of an hour starts the computation at midnight, but Oct
29 is 25 hours long for your timezone of MSK, leaving you stuck in
the same day at 11 pm.

The argument would be that not going forward 25 hours, rather than 24,
for the day which crosses daylight savings time boundaries in that
direction constitutes a bug - or at least a misbehaviour. (Naturally,
failing to go forward 23 hours rather than 24 when crossing in the other
direction would then be a similar bug.)

The counterargument would be that "+ 1 day" should always produce the
exact same time increment.

The counter-counterargument would be that since the actual
date-displaying code does treat daylight-savings-time days as being of
different lengths from others, the rest of the program should do the
same thing.

I'm not sure what the counters to that argument might be.

      The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.

reply via email to

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