Commit 022fd996 authored by Tom Lane's avatar Tom Lane

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.
parent d58f09e6
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.177 2006/10/16 19:58:26 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.178 2006/10/17 21:03:20 tgl Exp $ -->
<chapter id="datatype">
<title id="datatype-title">Data Types</title>
......@@ -1675,12 +1675,16 @@ SELECT b, char_length(b) FROM test2;
<tbody>
<row>
<entry><literal>PST</literal></entry>
<entry>Pacific Standard Time</entry>
<entry>Abbreviation (for Pacific Standard Time)</entry>
</row>
<row>
<entry><literal>America/New_York</literal></entry>
<entry>Full time zone name</entry>
</row>
<row>
<entry><literal>PST8PDT</literal></entry>
<entry>POSIX-style time zone specification</entry>
</row>
<row>
<entry><literal>-8:00</literal></entry>
<entry>ISO-8601 offset for PST</entry>
......@@ -2183,7 +2187,7 @@ January 8 04:05:06 1999 PST
<listitem>
<para>
In addition to the timezone names and abbreviations,
<productname>PostgreSQL</productname> will accept time zone
<productname>PostgreSQL</productname> will accept POSIX-style time zone
specifications of the form <replaceable>STD</><replaceable>offset</> or
<replaceable>STD</><replaceable>offset</><replaceable>DST</>, where
<replaceable>STD</> is a zone abbreviation, <replaceable>offset</> is a
......@@ -2220,12 +2224,6 @@ January 8 04:05:06 1999 PST
prior to 8.2, which were case-sensitive in some contexts and not others.)
</para>
<para>
Note that timezone names are <emphasis>not</> used for date/time output
&mdash; all supported output formats use numeric timezone displays to
avoid ambiguity.
</para>
<para>
Neither full names nor abbreviations are hard-wired into the server;
they are obtained from configuration files stored under
......
<!-- $PostgreSQL: pgsql/doc/src/sgml/datetime.sgml,v 2.54 2006/09/22 16:35:55 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/datetime.sgml,v 2.55 2006/10/17 21:03:20 tgl Exp $ -->
<appendix id="datetime-appendix">
<title>Date/Time Support</title>
......@@ -46,9 +46,9 @@
<para>
If the numeric token contains a dash (<literal>-</>), slash
(<literal>/</>), or two or more dots (<literal>.</>), this is
a date string which may have a text month. In case of a slash
(<literal>/</>) it can also be a full time zone name like
<literal>America/New_York</>.
a date string which may have a text month. If a date token has
already been seen, it is instead interpreted as a time zone
name (e.g., <literal>America/New_York</>).
</para>
</step>
......@@ -64,7 +64,7 @@
<step>
<para>
If the token starts with a plus (<literal>+</>) or minus
(<literal>-</>), then it is either a time zone or a special
(<literal>-</>), then it is either a numeric time zone or a special
field.
</para>
</step>
......@@ -73,30 +73,24 @@
<step>
<para>
If the token is a text string, match up with possible strings.
If the token is a text string, match up with possible strings:
</para>
<substeps>
<step>
<para>
Do a binary-search table lookup for the token
as either a special string (e.g., <literal>today</literal>),
day (e.g., <literal>Thursday</literal>),
month (e.g., <literal>January</literal>),
or noise word (e.g., <literal>at</literal>, <literal>on</literal>).
</para>
<para>
Set field values and bit mask for fields.
For example, set year, month, day for <literal>today</literal>,
and additionally hour, minute, second for <literal>now</literal>.
Do a binary-search table lookup for the token as a time zone
abbreviation.
</para>
</step>
<step>
<para>
If not found, do a similar binary-search table lookup to match
the token with a time zone.
the token as either a special string (e.g., <literal>today</literal>),
day (e.g., <literal>Thursday</literal>),
month (e.g., <literal>January</literal>),
or noise word (e.g., <literal>at</literal>, <literal>on</literal>).
</para>
</step>
......
This diff is collapsed.
......@@ -448,7 +448,7 @@ SELECT '' AS "64", d1 + interval '1 year' AS one_year FROM TIMESTAMP_TBL;
| Tue Feb 10 17:32:01 1998
| Tue Feb 10 17:32:01 1998
| Tue Feb 10 17:32:01 1998
| Tue Feb 10 14:32:01 1998
| Tue Feb 10 17:32:01 1998
| Wed Jun 10 18:32:01 1998
| Tue Feb 10 17:32:01 1998
| Wed Feb 11 17:32:01 1998
......@@ -518,7 +518,7 @@ SELECT '' AS "64", d1 - interval '1 year' AS one_year FROM TIMESTAMP_TBL;
| Sat Feb 10 17:32:01 1996
| Sat Feb 10 17:32:01 1996
| Sat Feb 10 17:32:01 1996
| Sat Feb 10 14:32:01 1996
| Sat Feb 10 17:32:01 1996
| Mon Jun 10 18:32:01 1996
| Sat Feb 10 17:32:01 1996
| Sun Feb 11 17:32:01 1996
......@@ -936,8 +936,8 @@ SELECT t.d1 + i.f1 AS "102" FROM TIMESTAMP_TBL t, INTERVAL_TBL i
Mon Feb 10 22:32:01 1997
Mon Feb 10 17:33:01 1997
Mon Feb 10 22:32:01 1997
Mon Feb 10 14:33:01 1997
Mon Feb 10 19:32:01 1997
Mon Feb 10 17:33:01 1997
Mon Feb 10 22:32:01 1997
Tue Jun 10 18:33:01 1997
Tue Jun 10 23:32:01 1997
Mon Feb 10 17:33:01 1997
......@@ -1047,8 +1047,8 @@ SELECT t.d1 - i.f1 AS "102" FROM TIMESTAMP_TBL t, INTERVAL_TBL i
Mon Feb 10 12:32:01 1997
Mon Feb 10 17:31:01 1997
Mon Feb 10 12:32:01 1997
Mon Feb 10 14:31:01 1997
Mon Feb 10 09:32:01 1997
Mon Feb 10 17:31:01 1997
Mon Feb 10 12:32:01 1997
Tue Jun 10 18:31:01 1997
Tue Jun 10 13:32:01 1997
Mon Feb 10 17:31:01 1997
......@@ -2538,7 +2538,7 @@ SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL;
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 14:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Jun 10 18:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Feb 11 17:32:01 1997
......@@ -2621,7 +2621,7 @@ SELECT '' AS "64", d1 AS us_iso FROM TIMESTAMP_TBL;
| 1997-02-10 17:32:01
| 1997-02-10 17:32:01
| 1997-02-10 17:32:01
| 1997-02-10 14:32:01
| 1997-02-10 17:32:01
| 1997-06-10 18:32:01
| 1997-02-10 17:32:01
| 1997-02-11 17:32:01
......@@ -2710,7 +2710,7 @@ SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL;
| 02/10/1997 17:32:01
| 02/10/1997 17:32:01
| 02/10/1997 17:32:01
| 02/10/1997 14:32:01
| 02/10/1997 17:32:01
| 06/10/1997 18:32:01
| 02/10/1997 17:32:01
| 02/11/1997 17:32:01
......@@ -2806,7 +2806,7 @@ SELECT '' AS "65", d1 AS european_postgres FROM TIMESTAMP_TBL;
| Mon 10 Feb 17:32:01 1997
| Mon 10 Feb 17:32:01 1997
| Mon 10 Feb 17:32:01 1997
| Mon 10 Feb 14:32:01 1997
| Mon 10 Feb 17:32:01 1997
| Tue 10 Jun 18:32:01 1997
| Mon 10 Feb 17:32:01 1997
| Tue 11 Feb 17:32:01 1997
......@@ -2896,7 +2896,7 @@ SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL;
| 1997-02-10 17:32:01
| 1997-02-10 17:32:01
| 1997-02-10 17:32:01
| 1997-02-10 14:32:01
| 1997-02-10 17:32:01
| 1997-06-10 18:32:01
| 1997-02-10 17:32:01
| 1997-02-11 17:32:01
......@@ -2986,7 +2986,7 @@ SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL;
| 10/02/1997 17:32:01
| 10/02/1997 17:32:01
| 10/02/1997 17:32:01
| 10/02/1997 14:32:01
| 10/02/1997 17:32:01
| 10/06/1997 18:32:01
| 10/02/1997 17:32:01
| 11/02/1997 17:32:01
......
......@@ -80,12 +80,12 @@ INSERT INTO TIMESTAMP_TBL VALUES ('1997-02-10 17:32:01 -08:00');
INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 -0800');
INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 17:32:01 -07:00');
INSERT INTO TIMESTAMP_TBL VALUES ('2001-09-22T18:19:20');
-- POSIX format
-- POSIX format (note that the timezone abbrev is just decoration here)
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 12:14:03 GMT -2');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 03:14:04 EST+3');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 02:14:05 EST +2:00');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 12:14:03 GMT-2');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 03:14:04 PST+8');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 02:14:05 MST+7:00');
-- Variations for acceptable input formats
INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 17:32:01 1997 -0800');
INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 17:32:01 1997');
......@@ -101,9 +101,9 @@ INSERT INTO TIMESTAMP_TBL VALUES ('97/02/10 17:32:01 UTC');
reset datestyle;
INSERT INTO TIMESTAMP_TBL VALUES ('1997.041 17:32:01 UTC');
INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 America/New_York');
-- this fails
-- this fails (even though TZ is a no-op, we still look it up)
INSERT INTO TIMESTAMP_TBL VALUES ('19970710 173201 America/Does_not_exist');
ERROR: time zone "America/Does_not_exist" not recognized
ERROR: time zone "america/does_not_exist" not recognized
-- Check date conversion and date arithmetic
INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 18:32:01 PDT');
INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 17:32:01 1997');
......@@ -179,7 +179,7 @@ SELECT '' AS "64", d1 FROM TIMESTAMP_TBL;
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 14:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Jun 10 18:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Feb 11 17:32:01 1997
......@@ -248,7 +248,7 @@ SELECT '' AS "48", d1 FROM TIMESTAMP_TBL
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 14:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Jun 10 18:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Feb 11 17:32:01 1997
......@@ -333,7 +333,7 @@ SELECT '' AS "63", d1 FROM TIMESTAMP_TBL
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 14:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Jun 10 18:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Feb 11 17:32:01 1997
......@@ -424,7 +424,7 @@ SELECT '' AS "49", d1 FROM TIMESTAMP_TBL
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 17:32:01 1997
| Mon Feb 10 14:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Jun 10 18:32:01 1997
| Mon Feb 10 17:32:01 1997
| Tue Feb 11 17:32:01 1997
......@@ -480,7 +480,7 @@ SELECT '' AS "54", d1 - timestamp without time zone '1997-01-02' AS diff
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 14 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 159 days 18 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 40 days 17 hours 32 mins 1 sec
......@@ -550,7 +550,7 @@ SELECT '' AS "54", d1 - timestamp without time zone '1997-01-02' AS diff
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 39 days 14 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 159 days 18 hours 32 mins 1 sec
| @ 39 days 17 hours 32 mins 1 sec
| @ 40 days 17 hours 32 mins 1 sec
......@@ -614,7 +614,7 @@ SELECT '' AS "54", d1 as "timestamp",
| Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1
| Mon Feb 10 14:32:01 1997 | 1997 | 2 | 10 | 14 | 32 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1
| Tue Jun 10 18:32:01 1997 | 1997 | 6 | 10 | 18 | 32 | 1
| Mon Feb 10 17:32:01 1997 | 1997 | 2 | 10 | 17 | 32 | 1
| Tue Feb 11 17:32:01 1997 | 1997 | 2 | 11 | 17 | 32 | 1
......@@ -677,7 +677,7 @@ SELECT '' AS "54", d1 as "timestamp",
| Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000
| Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000
| Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000
| Mon Feb 10 14:32:01 1997 | 1 | 1000 | 1000000
| Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000
| Tue Jun 10 18:32:01 1997 | 2 | 1000 | 1000000
| Mon Feb 10 17:32:01 1997 | 1 | 1000 | 1000000
| Tue Feb 11 17:32:01 1997 | 1 | 1000 | 1000000
......@@ -1025,7 +1025,7 @@ SELECT '' AS to_char_5, to_char(d1, 'HH HH12 HH24 MI SS SSSS')
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
| 02 02 14 32 01 52321
| 05 05 17 32 01 63121
| 06 06 18 32 01 66721
| 05 05 17 32 01 63121
| 05 05 17 32 01 63121
......@@ -1096,7 +1096,7 @@ SELECT '' AS to_char_6, to_char(d1, E'"HH:MI:SS is" HH:MI:SS "\\"text between qu
| HH:MI:SS is 05:32:01 "text between quote marks"
| HH:MI:SS is 05:32:01 "text between quote marks"
| HH:MI:SS is 05:32:01 "text between quote marks"
| HH:MI:SS is 02:32:01 "text between quote marks"
| HH:MI:SS is 05:32:01 "text between quote marks"
| HH:MI:SS is 06:32:01 "text between quote marks"
| HH:MI:SS is 05:32:01 "text between quote marks"
| HH:MI:SS is 05:32:01 "text between quote marks"
......@@ -1167,7 +1167,7 @@ SELECT '' AS to_char_7, to_char(d1, 'HH24--text--MI--text--SS')
| 17--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
| 14--text--32--text--01
| 17--text--32--text--01
| 18--text--32--text--01
| 17--text--32--text--01
| 17--text--32--text--01
......@@ -1310,7 +1310,7 @@ SELECT '' AS to_char_9, to_char(d1, 'YYYY A.D. YYYY a.d. YYYY bc HH:MI:SS P.M. H
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 02:32:01 P.M. 02:32:01 p.m. 02:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 06:32:01 P.M. 06:32:01 p.m. 06:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
| 1997 A.D. 1997 a.d. 1997 ad 05:32:01 P.M. 05:32:01 p.m. 05:32:01 pm
......
......@@ -75,12 +75,12 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-02-10 17:32:01 -08:00');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 -0800');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 17:32:01 -07:00');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2001-09-22T18:19:20');
-- POSIX format
-- POSIX format (note that the timezone abbrev is just decoration here)
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT -2');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 EST+3');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 EST +2:00');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT-2');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 PST+8');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 MST+7:00');
-- Variations for acceptable input formats
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997');
......@@ -111,7 +111,7 @@ SELECT '19970710 173201' AT TIME ZONE 'America/New_York';
(1 row)
INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970710 173201 America/Does_not_exist');
ERROR: time zone "America/Does_not_exist" not recognized
ERROR: time zone "america/does_not_exist" not recognized
SELECT '19970710 173201' AT TIME ZONE 'America/Does_not_exist';
ERROR: time zone "America/Does_not_exist" not recognized
-- Check date conversion and date arithmetic
......
......@@ -62,12 +62,12 @@ INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 -0800');
INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 17:32:01 -07:00');
INSERT INTO TIMESTAMP_TBL VALUES ('2001-09-22T18:19:20');
-- POSIX format
-- POSIX format (note that the timezone abbrev is just decoration here)
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 12:14:03 GMT -2');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 03:14:04 EST+3');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 02:14:05 EST +2:00');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 12:14:03 GMT-2');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 03:14:04 PST+8');
INSERT INTO TIMESTAMP_TBL VALUES ('2000-03-15 02:14:05 MST+7:00');
-- Variations for acceptable input formats
INSERT INTO TIMESTAMP_TBL VALUES ('Feb 10 17:32:01 1997 -0800');
......@@ -83,12 +83,10 @@ INSERT INTO TIMESTAMP_TBL VALUES ('97FEB10 5:32:01PM UTC');
INSERT INTO TIMESTAMP_TBL VALUES ('97/02/10 17:32:01 UTC');
reset datestyle;
INSERT INTO TIMESTAMP_TBL VALUES ('1997.041 17:32:01 UTC');
INSERT INTO TIMESTAMP_TBL VALUES ('19970210 173201 America/New_York');
-- this fails
-- this fails (even though TZ is a no-op, we still look it up)
INSERT INTO TIMESTAMP_TBL VALUES ('19970710 173201 America/Does_not_exist');
-- Check date conversion and date arithmetic
INSERT INTO TIMESTAMP_TBL VALUES ('1997-06-10 18:32:01 PDT');
......
......@@ -56,12 +56,12 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('19970210 173201 -0800');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('1997-06-10 17:32:01 -07:00');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2001-09-22T18:19:20');
-- POSIX format
-- POSIX format (note that the timezone abbrev is just decoration here)
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 08:14:01 GMT+8');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 13:14:02 GMT-1');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT -2');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 EST+3');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 EST +2:00');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 12:14:03 GMT-2');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 03:14:04 PST+8');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('2000-03-15 02:14:05 MST+7:00');
-- Variations for acceptable input formats
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Feb 10 17:32:01 1997 -0800');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment