[Top][All Lists]

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

Re: [bug-gnulib] problem with getdate

From: Ian Abbott
Subject: Re: [bug-gnulib] problem with getdate
Date: Tue, 12 Apr 2005 10:18:43 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20050118)

On 12/04/05 08:24, Paul Eggert wrote:
Derek Price <address@hidden> writes:

If I pass these times in as "EDT" (Eastern Daylight Time), then they
work.  Ian mentioned doing something similar with "BST" (British
Summer Time) in a separate email.  Is this an intentional failure?

No, it's not.  I installed this fix into gnulib.  Thanks for reporting

2005-04-12  Paul Eggert  <address@hidden>

        * getdate.y (universal_time_zone_table): New constant.
        (time_zone_table): Remove GMT, UT, UTC entries; they're now in
        (lookup_zone): Prefer universal_time_zone_table to
        local_time_zone_table, so that "GMT" time stamps are allowed in
        London during the summer.  Problem reported by Ian Abbott.

I realize GMT is something of a special case, since it is both a local timezone in the UK and a universal timezone (historically as a predecessor of UTC and currently in certain applications). However, in the general case, should the validity of a timespec depend on the local timezone in effect when running the code? Going back to the "EST" (Eastern Standard Time) example, the validity of dates that fall within the daylight savings period varies according to the local timezone:

$ TZ=Europe/London ./getdate
Enter date, or blank line to exit.
        > 2005-5-1 EST
2005-05-01 06:00:00.000000000
        > $
$ TZ=America/New_York ./getdate
Enter date, or blank line to exit.
        > 2005-5-1 EST
Bad format - couldn't convert.
        > $

The timespec "2005-5-1 EST" is not valid if EST time periods and EDT time periods should be considered mutually exclusive (except when they overlap at the end of EDT). But I don't think the validity should depend on the local timezone and a forgiving implementation should probably allow "2005-5-1 EST" regardless of whether EST or EDT is in effect.

-=( Ian Abbott @ MEV Ltd.    E-mail: <address@hidden>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

reply via email to

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