bug-coreutils
[Top][All Lists]
Advanced

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

Re: a bug in date concerning daylight saving time


From: Bob Proulx
Subject: Re: a bug in date concerning daylight saving time
Date: Fri, 28 Sep 2007 17:03:56 -0600
User-agent: Mutt/1.5.9i

Lao DanTong wrote:
> $ ./date --date=2007-10-14
> ./date: invalid date `2007-10-14'

> America/Sao_Paulo  Sun Oct 14 02:59:59 2007 UTC = Sat Oct 13 23:59:59 2007 
> BRT isdst=0 gmtoff=-10800
> America/Sao_Paulo  Sun Oct 14 03:00:00 2007 UTC = Sun Oct 14 01:00:00 2007 
> BRST isdst=1 gmtoff=-7200

This confirms the analysis given by John when he said:

John Cowan wrote:
> 2007-10-14 means 2007-10-14T00:00:00, but that second does not exist
> in any timezone observing the "Brazil" rules: time jumps directly from
> 2007-10-13T23:59:59 to 2007-10-14T01:00:00.

The timezone defines that the second before in the old timezone is Sat
Oct 13 23:59:59 2007 BRT and the second after in the new timezone is
Sun Oct 14 01:00:00 2007 BRST.  There are no seconds between.

The date program uses 2007-10-14 to mean 2007-10-14 00:00:00 and as
defined by the zoneinfo data that time does not exist.  The date
truly is an invalid date.

Bob





reply via email to

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