Skip site navigation (1) Skip section navigation (2)

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>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simplifying timezone support
Date: 2003-02-21 23:45:54
Message-ID: 20030221234553.GA5950@wallace.ece.rice.edu (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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.

> 
> > 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 ...

It wouldn't happen on every call - only with funky timezone
representations.  We could NOTICE use of tzset(), as well, to alert the
DBA about something fishy, if you'd like.

Ross

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2003-02-22 00:36:43
Subject: ILIKE
Previous:From: Tom LaneDate: 2003-02-21 23:15:31
Subject: Re: Simplifying timezone support

pgsql-patches by date

Next:From: Gavin SherryDate: 2003-02-22 00:08:05
Subject: Re: Minor doc patch: create function
Previous:From: Tom LaneDate: 2003-02-21 23:15:31
Subject: Re: Simplifying timezone support

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group