bug-coreutils
[Top][All Lists]
Advanced

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

Re: PDT timezone bug in GNU coreutils "date" v6.9


From: Philip Rowlands
Subject: Re: PDT timezone bug in GNU coreutils "date" v6.9
Date: Fri, 18 Jan 2008 16:20:22 +0000 (GMT)

On Thu, 17 Jan 2008, Bob Proulx wrote:

But the case under discussion was PDT not EST.

 $ TZ=US/Pacific date -d"Tue Jan 14 08:25:26 PDT 2008"
 date: invalid date `Tue Jan 14 08:25:26 PDT 2008'

At this point I don't know if PDT is ambiguous or not

Not to getdate. There is one "PDT" entry in time_zone_table:
  { "PDT",      tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */

Consulting the tables with 'zdump -v US/Eastern | grep 2008' shows that indeed "Tue Jan 14 08:25:26 EDT 2008" is not a valid date in that timezone. It should be flagged with an error regardless of local timezone setting.

Are we in the territory of documented error or opinion? Can you cite the docs which explain why "Tue Jan 14 08:25:26 EDT 2008" is not valid? I can't find any (otherwise I'd stop arguing :)), which is why I ask whether treating "EDT" as "-0400" is technically wrong or aesthetically wrong. getdate isn't confused, and with a non-conflicting TZ will handle the input unambiguously.


Cheers,
Phil




reply via email to

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