Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2abc889

Browse files
committed
Run regression tests with timezone America/Los_Angeles.
Historically we've used timezone "PST8PDT", but the recent release2024b of tzdb changes the definition of that zone in a way thatbreaks many test cases concerned with dates before 1970. Althoughwe've not yet adopted 2024b into our own tree, this is alreadyproblematic for people using --with-system-tzdata if their platformhas already adopted 2024b. To work with both older and newerversions of tzdb, switch to using "America/Los_Angeles", acceptingthe ensuing changes in regression test results.Back-patch to all supported branches.Per report and patch from Wolfgang Walther.Discussion:https://postgr.es/m/0a997455-5aba-4cf2-a354-d26d8bcbfae6@technowledgy.de
1 parentcb52d1c commit2abc889

File tree

8 files changed

+120
-105
lines changed

8 files changed

+120
-105
lines changed

‎doc/src/sgml/ref/set.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ SELECT setseed(<replaceable>value</replaceable>);
200200

201201
<variablelist>
202202
<varlistentry>
203-
<term><literal>'PST8PDT'</literal></term>
203+
<term><literal>'America/Los_Angeles'</literal></term>
204204
<listitem>
205205
<para>
206206
The time zone for Berkeley, California.
@@ -298,7 +298,7 @@ SET datestyle TO postgres, dmy;
298298
<para>
299299
Set the time zone for Berkeley, California:
300300
<screen>
301-
SET TIME ZONE 'PST8PDT';
301+
SET TIME ZONE 'America/Los_Angeles';
302302
</screen>
303303
</para>
304304

‎doc/src/sgml/regress.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,11 @@ make check NO_LOCALE=1
534534
<para>
535535
Most of the date and time results are dependent on the time zone
536536
environment. The reference files are generated for time zone
537-
<literal>PST8PDT</literal> (Berkeley, California), and there will be
537+
<literal>America/Los_Angeles</literal>, and there will be
538538
apparent failures if the tests are not run with that time zone setting.
539539
The regression test driver sets environment variable
540-
<envar>PGTZ</envar> to <literal>PST8PDT</literal>, which normally
541-
ensures proper results.
540+
<envar>PGTZ</envar> to <literal>America/Los_Angeles</literal>,
541+
which normallyensures proper results.
542542
</para>
543543
</sect2>
544544

‎src/test/regress/expected/date.out

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ SELECT DATE_TRUNC('MILLENNIUM', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1001
12951295
SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01
12961296
date_trunc
12971297
------------------------------
1298-
Thu Jan 01 00:00:00 1001PST
1298+
Thu Jan 01 00:00:00 1001LMT
12991299
(1 row)
13001300

13011301
SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901
@@ -1319,13 +1319,13 @@ SELECT DATE_TRUNC('CENTURY', DATE '2004-08-10'); -- 2001-01-01
13191319
SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01
13201320
date_trunc
13211321
------------------------------
1322-
Mon Jan 01 00:00:00 0001PST
1322+
Mon Jan 01 00:00:00 0001LMT
13231323
(1 row)
13241324

13251325
SELECT DATE_TRUNC('CENTURY', DATE '0055-08-10 BC'); -- 0100-01-01 BC
13261326
date_trunc
13271327
---------------------------------
1328-
Tue Jan 01 00:00:00 0100PST BC
1328+
Tue Jan 01 00:00:00 0100LMT BC
13291329
(1 row)
13301330

13311331
SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
@@ -1337,13 +1337,13 @@ SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
13371337
SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC
13381338
date_trunc
13391339
---------------------------------
1340-
Sat Jan 01 00:00:00 0001PST BC
1340+
Sat Jan 01 00:00:00 0001LMT BC
13411341
(1 row)
13421342

13431343
SELECT DATE_TRUNC('DECADE', DATE '0002-12-31 BC'); -- 0011-01-01 BC
13441344
date_trunc
13451345
---------------------------------
1346-
Mon Jan 01 00:00:00 0011PST BC
1346+
Mon Jan 01 00:00:00 0011LMT BC
13471347
(1 row)
13481348

13491349
--

‎src/test/regress/expected/horology.out

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
--
22
-- HOROLOGY
33
--
4-
SET DateStyle = 'Postgres, MDY';
5-
SHOW TimeZone; -- Many of these tests depend on the prevailing setting
6-
TimeZone
7-
----------
8-
PST8PDT
4+
SHOW TimeZone; -- Many of these tests depend on the prevailing settings
5+
TimeZone
6+
---------------------
7+
America/Los_Angeles
8+
(1 row)
9+
10+
SHOW DateStyle;
11+
DateStyle
12+
---------------
13+
Postgres, MDY
914
(1 row)
1015

1116
--
@@ -1033,12 +1038,12 @@ SELECT d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
10331038
Sat Feb 14 17:32:01 1998 PST
10341039
Sun Feb 15 17:32:01 1998 PST
10351040
Mon Feb 16 17:32:01 1998 PST
1036-
Thu Feb 16 17:32:01 0096PST BC
1037-
Sun Feb 16 17:32:01 0098PST
1038-
Fri Feb 16 17:32:01 0598PST
1039-
Wed Feb 16 17:32:01 1098PST
1040-
Sun Feb 16 17:32:01 1698PST
1041-
Fri Feb 16 17:32:01 1798PST
1041+
Thu Feb 16 17:32:01 0096LMT BC
1042+
Sun Feb 16 17:32:01 0098LMT
1043+
Fri Feb 16 17:32:01 0598LMT
1044+
Wed Feb 16 17:32:01 1098LMT
1045+
Sun Feb 16 17:32:01 1698LMT
1046+
Fri Feb 16 17:32:01 1798LMT
10421047
Wed Feb 16 17:32:01 1898 PST
10431048
Mon Feb 16 17:32:01 1998 PST
10441049
Sun Feb 16 17:32:01 2098 PST
@@ -1104,12 +1109,12 @@ SELECT d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
11041109
Wed Feb 14 17:32:01 1996 PST
11051110
Thu Feb 15 17:32:01 1996 PST
11061111
Fri Feb 16 17:32:01 1996 PST
1107-
Mon Feb 16 17:32:01 0098PST BC
1108-
Thu Feb 16 17:32:01 0096PST
1109-
Tue Feb 16 17:32:01 0596PST
1110-
Sun Feb 16 17:32:01 1096PST
1111-
Thu Feb 16 17:32:01 1696PST
1112-
Tue Feb 16 17:32:01 1796PST
1112+
Mon Feb 16 17:32:01 0098LMT BC
1113+
Thu Feb 16 17:32:01 0096LMT
1114+
Tue Feb 16 17:32:01 0596LMT
1115+
Sun Feb 16 17:32:01 1096LMT
1116+
Thu Feb 16 17:32:01 1696LMT
1117+
Tue Feb 16 17:32:01 1796LMT
11131118
Sun Feb 16 17:32:01 1896 PST
11141119
Fri Feb 16 17:32:01 1996 PST
11151120
Thu Feb 16 17:32:01 2096 PST
@@ -2388,7 +2393,7 @@ SELECT '2020-10-05'::timestamptz > '2202020-10-05'::date as f;
23882393
SELECT '4714-11-24 BC'::date::timestamptz;
23892394
timestamptz
23902395
---------------------------------
2391-
Mon Nov 24 00:00:00 4714PST BC
2396+
Mon Nov 24 00:00:00 4714LMT BC
23922397
(1 row)
23932398

23942399
SET TimeZone = 'UTC-2';
@@ -2966,13 +2971,13 @@ RESET DateStyle;
29662971
SELECT to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
29672972
to_timestamp
29682973
------------------------------
2969-
Sat Feb 16 08:14:30 0097PST
2974+
Sat Feb 16 08:14:30 0097LMT
29702975
(1 row)
29712976

29722977
SELECT to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
29732978
to_timestamp
29742979
------------------------------
2975-
Sat Feb 16 08:14:30 0097PST
2980+
Sat Feb 16 08:14:30 0097LMT
29762981
(1 row)
29772982

29782983
SELECT to_timestamp('2011$03!18 23_38_15', 'YYYY-MM-DD HH24:MI:SS');
@@ -3009,7 +3014,7 @@ SELECT to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16',
30093014
SELECT to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
30103015
to_timestamp
30113016
------------------------------
3012-
Sat Aug 21 00:00:00 1582PST
3017+
Sat Aug 21 00:00:00 1582LMT
30133018
(1 row)
30143019

30153020
SELECT to_timestamp('15 "text between quote marks" 98 54 45',
@@ -3073,7 +3078,7 @@ SELECT to_timestamp('1997 AD 11 16', 'YYYY BC MM DD');
30733078
SELECT to_timestamp('1997 BC 11 16', 'YYYY BC MM DD');
30743079
to_timestamp
30753080
---------------------------------
3076-
Tue Nov 16 00:00:00 1997PST BC
3081+
Tue Nov 16 00:00:00 1997LMT BC
30773082
(1 row)
30783083

30793084
SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
@@ -3085,7 +3090,7 @@ SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
30853090
SELECT to_timestamp('1997 B.C. 11 16', 'YYYY B.C. MM DD');
30863091
to_timestamp
30873092
---------------------------------
3088-
Tue Nov 16 00:00:00 1997PST BC
3093+
Tue Nov 16 00:00:00 1997LMT BC
30893094
(1 row)
30903095

30913096
SELECT to_timestamp('9-1116', 'Y-MMDD');
@@ -3355,19 +3360,19 @@ SELECT to_date('-44-02-01 BC','YYYY-MM-DD BC');
33553360
SELECT to_timestamp('44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
33563361
to_timestamp
33573362
---------------------------------
3358-
Fri Feb 01 11:12:13 0044PST BC
3363+
Fri Feb 01 11:12:13 0044LMT BC
33593364
(1 row)
33603365

33613366
SELECT to_timestamp('-44-02-01 11:12:13','YYYY-MM-DD HH24:MI:SS');
33623367
to_timestamp
33633368
---------------------------------
3364-
Fri Feb 01 11:12:13 0044PST BC
3369+
Fri Feb 01 11:12:13 0044LMT BC
33653370
(1 row)
33663371

33673372
SELECT to_timestamp('-44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
33683373
to_timestamp
33693374
------------------------------
3370-
Mon Feb 01 11:12:13 0044PST
3375+
Mon Feb 01 11:12:13 0044LMT
33713376
(1 row)
33723377

33733378
--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp