Re: Simplifying timezone support

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simplifying timezone support
Date: 2003-02-22 02:39:12
Message-ID: 20030222023912.GA8600@wallace.ece.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, Feb 21, 2003 at 05:45:53PM -0600, Ross J. Reedstrom wrote:
> On Fri, Feb 21, 2003 at 06:15:31PM -0500, Tom Lane wrote:
> > "Ross J. Reedstrom" <reedstrm(at)rice(dot)edu> writes:
> <snip>
> >
> > 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.
>
> Well, that'll either get caught by the existing table (we've got six
> different spellings of GMT, currently) or by the 'string in != string out'
> case - the zoneinfo format requires a 3 or more character abbreviation
> for the time zone. For every case I'v looked at in my zoneinfo directory,
> it's either 3 or 4 uppercase characters, and _never_ matches the filename
> path string used to set it. I'll do an exhaustive test after dinner.

O.K., I've run the test: of the 1108 files in my zoneinfo database,
only 11 have matching filenames to the canonical name returned after
setting TZ. Of those 11, 4 are some version of GMT (GMT, UCT, UTC,
WET), of which, one is in fact missing from our table - UCT. At minimum,
I'll add that.

Every other validly formatted TZ variable that returns GMT should be
caught be the datetktbl check.

I'll play with it this weekend, see how hard it is to make it work.

Ross

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-02-22 04:43:09 regression failure - horology
Previous Message Peter Eisentraut 2003-02-22 00:36:43 ILIKE

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-02-22 02:44:27 Re: psql patch
Previous Message Gavin Sherry 2003-02-22 00:08:05 Re: Minor doc patch: create function