Re: Simplifying timezone support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simplifying timezone support
Date: 2003-02-21 23:15:31
Message-ID: 20825.1045869331@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Ross J. Reedstrom" <reedstrm(at)rice(dot)edu> writes:
> If the time zone came back UNKOWN, we go ahead and see if tzset() can
> interpret it. Criteria for failure: if the timezone offset came back 0,
> and the reported tzname[0] is the same as the string that we passed in. If
> it does, we fire a NOTICE about an unknown spelling of GMT. Note that we
> would have already caught all _known_ spellings of GMT in the first step,
> so we won't be spamming the DBA with warnings about 'GMT' and 'UTC', etc.

I'm worried about cases like "Africa/Benin" for places that just happen
to be on the prime meridian, but don't call their time GMT or UTC.
Looking at a globe, it also seems possible that there are places an hour
west of Greenwich, for which this could fail during daylight-savings
season.

> An extension to this would be to use the tzset() trick above directly
> in the datetime constant parser, as a fallback after not matching the
> table. In that case, we'd probably want to treat the unknown spelling
> of GMT as an error, though (as it currently does).

I think tzset() is probably much too slow to consider calling on every
pass through timestamptz_in ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2003-02-21 23:45:54 Re: Simplifying timezone support
Previous Message Ross J. Reedstrom 2003-02-21 22:14:57 Re: Simplifying timezone support

Browse pgsql-patches by date

  From Date Subject
Next Message Ross J. Reedstrom 2003-02-21 23:45:54 Re: Simplifying timezone support
Previous Message Ross J. Reedstrom 2003-02-21 22:14:57 Re: Simplifying timezone support