OSDN Git Service

Fix up some problems in handling of zic-style time zone names in datetime
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 17 Oct 2006 21:03:21 +0000 (21:03 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 17 Oct 2006 21:03:21 +0000 (21:03 +0000)
commit022fd99668d7c758b1d17952c46b80529776ce0d
treec9d5ec03c254e2a2dee0a83976d08eabc6fc487a
parentd58f09e6b3f45d43562c2fc9a34327acb526aced
Fix up some problems in handling of zic-style time zone names in datetime
input routines.  Remove the former "DecodePosixTimezone" function in favor of
letting the zic code handle POSIX-style zone specs (see tzparse()).  In
particular this means that "PST+3" now means the same as "-03", whereas it
used to mean "-11" --- the zone abbreviation is effectively just a noise word
in this syntax.  Make sure that all named and POSIX-style zone names will be
parsed as a single token.  Fix long-standing bogosities in printing and input
of fractional-hour timezone offsets (since the tzparse() code will accept
these, we'd better make 'em work).  Also correct an error in the original
coding of the zic-zone-name patch: in "timestamp without time zone" input,
zone names are supposed to be allowed but ignored, but the coding was such
that the zone changed the interpretation anyway.
doc/src/sgml/datatype.sgml
doc/src/sgml/datetime.sgml
src/backend/utils/adt/datetime.c
src/test/regress/expected/horology.out
src/test/regress/expected/timestamp.out
src/test/regress/expected/timestamptz.out
src/test/regress/sql/timestamp.sql
src/test/regress/sql/timestamptz.sql