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


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to