This is the mail archive of the
cygwin
mailing list for the Cygwin project.
`TZ=Pacific/Kwajalein date -d 1993-08-20` doesn't fail
- From: "Voelker, Bernhard" <bernhard dot voelker at siemens-enterprise dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Cc: Paul Eggert <eggert at CS dot UCLA dot EDU>
- Date: Tue, 24 Aug 2010 11:06:18 +0200
- Subject: `TZ=Pacific/Kwajalein date -d 1993-08-20` doesn't fail
- References: <29135f40.8bed.12a97c158ac.Coremail.lijpbasin@126.com> <20100823010955.22506.qmail@kosh.dhis.org> <4C729B63.4000405@cs.ucla.edu> <7856072A9D04C24B82DFE2B1112FE38A0177ADD66E@MCHP058A.global-ad.net> <4C737CEC.1000705@cs.ucla.edu>
Hi cyg,
this issue emerged from one of the typical questions on the bug-coreutils@gnu.org
mailing list about why "date -d '1991-04-14 +1 day' fails"
http://lists.gnu.org/archive/html/bug-coreutils/2010-08/msg00077.html
The discussion around date calculation with such a daylight savings time issues
(gap at 00:00 in the user's timezone) became esoteric, but there was a difference
detected between upstream and cygwin of the coreutils-8.5 package.
The day 1993-08-20 doesn't exist in TZ=Pacific/Kwajalein (because at midnight Kwajalein
moved the clocks ahead by 24 hours.), so coreutils 8.5 issues the following error on native
Linux (according to Paul Eggert):
$ TZ=Pacific/Kwajalein date -d 1993-08-20
date: invalid date `1993-08-20'
but it doesn't fail on my Cygwin installation (see below).
Is there a porting/packaging issue?
Have a nice day,
Berny
-----Original Message-----
From: Paul Eggert [mailto:eggert@CS.UCLA.EDU]
Sent: Dienstag, 24. August 2010 10:04
To: Voelker, Bernhard
Cc: Alan Curry; 6897@debbugs.gnu.org; 李嘉鹏
Subject: Re: bug#6897: date -d '1991-04-14 +1 day' fails
On 08/24/10 00:23, Voelker, Bernhard wrote:
> BTW: This example looks different here:
>
> $ TZ=Pacific/Kwajalein date -d 1993-08-20
> Sat Aug 21 00:00:00 MHT 1993
>
> $ date --version
> date (GNU coreutils) 8.5
> Packaged by Cygwin (8.5-2)
> ...
>
> Why?
Haven't a clue. Perhaps you can debug it? I get the
correct answer (i.e., there was no such date) on both
RHEL 5 with my own-built coreutils 8.5, and with
Ubuntu 10.04 with its standard-issue coreutils 7.4.