Re: Timezone discrepancies - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: Timezone discrepancies
Date
Msg-id 39C8D220.EA346EAD@alumni.caltech.edu
Whole thread Raw
In response to Timezone discrepancies  (Ed Loehr <eloehr@austin.rr.com>)
Responses Re: Timezone discrepancies
Re: Timezone discrepancies
List pgsql-hackers
(Cleaning up mail, and I don't see a reply to this...)

> Here are a few apparent discrepencies between pg7.0beta3 and the timezone
> documentation...
> 1)  Unrecognized timezones claimed in the docs:
> ERROR:  Bad timestamp external representation '1-1-2000 00:00:00 DST'
> ERROR:  Bad timestamp external representation '1-1-2000 00:00:00 ZP4'
> ERROR:  Bad timestamp external representation '1-1-2000 00:00:00 ZP5'
> ERROR:  Bad timestamp external representation '1-1-2000 00:00:00 ZP6'

DST - this is a docs error. DNT is the correct form for "Dansk Normal
Tid", and "DST" is a "Daylight Savings Time" qualifier for other time
zones. Will fix.

ZPx - this is a parser problem, in that currently time zones with
embedded digits are not allowed. Are these three time zones "official"
or used by anyone? I don't find them in my "zoneinfo" database on my
Linux boxes. I would propose that these three zones be eliminated from
the code, rather than putting a special case into the date/time parser.
afaik folks haven't noticed that this is a problem (except for Ed of
course ;). Comments?

> 2)  Timezone parsed without complaint but bogusly converted to local
> timezone:
>         SAT (South Australian Std Time)

Currently, this is mapped to be a noise word for "Saturday". Is this a
timezone form currently in use in Australia? If so, I can add it to the
"USE_AUSTRALIAN_RULES" variants.

Peter, will you be doing more work on configuration? If so, could we
implement --enable-australian-zones (or something similar) which sets
the internal USE_AUSTRALIAN_RULES parameter?

Thanks for catching these problems. I'm a bit puzzled why the docs and
code differ, since at least some of the things mentioned above go back
at least three years. Must have carried the doc info forward from
somewhere else??
                    - Thomas


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.0.2 crash, backtrace with debug available
Next
From: Tom Lane
Date:
Subject: loss of portability in ecpg