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

Commit2b94ee5

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 parent17c35ab commit2b94ee5

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
@@ -521,11 +521,11 @@ make check NO_LOCALE=1
521521
<para>
522522
Most of the date and time results are dependent on the time zone
523523
environment. The reference files are generated for time zone
524-
<literal>PST8PDT</literal> (Berkeley, California), and there will be
524+
<literal>America/Los_Angeles</literal>, and there will be
525525
apparent failures if the tests are not run with that time zone setting.
526526
The regression test driver sets environment variable
527-
<envar>PGTZ</envar> to <literal>PST8PDT</literal>, which normally
528-
ensures proper results.
527+
<envar>PGTZ</envar> to <literal>America/Los_Angeles</literal>,
528+
which normallyensures proper results.
529529
</para>
530530
</sect2>
531531

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ SELECT DATE_TRUNC('MILLENNIUM', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1001
12641264
SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01
12651265
date_trunc
12661266
------------------------------
1267-
Thu Jan 01 00:00:00 1001PST
1267+
Thu Jan 01 00:00:00 1001LMT
12681268
(1 row)
12691269

12701270
SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901
@@ -1288,13 +1288,13 @@ SELECT DATE_TRUNC('CENTURY', DATE '2004-08-10'); -- 2001-01-01
12881288
SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01
12891289
date_trunc
12901290
------------------------------
1291-
Mon Jan 01 00:00:00 0001PST
1291+
Mon Jan 01 00:00:00 0001LMT
12921292
(1 row)
12931293

12941294
SELECT DATE_TRUNC('CENTURY', DATE '0055-08-10 BC'); -- 0100-01-01 BC
12951295
date_trunc
12961296
---------------------------------
1297-
Tue Jan 01 00:00:00 0100PST BC
1297+
Tue Jan 01 00:00:00 0100LMT BC
12981298
(1 row)
12991299

13001300
SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
@@ -1306,13 +1306,13 @@ SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
13061306
SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC
13071307
date_trunc
13081308
---------------------------------
1309-
Sat Jan 01 00:00:00 0001PST BC
1309+
Sat Jan 01 00:00:00 0001LMT BC
13101310
(1 row)
13111311

13121312
SELECT DATE_TRUNC('DECADE', DATE '0002-12-31 BC'); -- 0011-01-01 BC
13131313
date_trunc
13141314
---------------------------------
1315-
Mon Jan 01 00:00:00 0011PST BC
1315+
Mon Jan 01 00:00:00 0011LMT BC
13161316
(1 row)
13171317

13181318
--

‎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
--
@@ -769,12 +774,12 @@ SELECT d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
769774
Sat Feb 14 17:32:01 1998 PST
770775
Sun Feb 15 17:32:01 1998 PST
771776
Mon Feb 16 17:32:01 1998 PST
772-
Thu Feb 16 17:32:01 0096PST BC
773-
Sun Feb 16 17:32:01 0098PST
774-
Fri Feb 16 17:32:01 0598PST
775-
Wed Feb 16 17:32:01 1098PST
776-
Sun Feb 16 17:32:01 1698PST
777-
Fri Feb 16 17:32:01 1798PST
777+
Thu Feb 16 17:32:01 0096LMT BC
778+
Sun Feb 16 17:32:01 0098LMT
779+
Fri Feb 16 17:32:01 0598LMT
780+
Wed Feb 16 17:32:01 1098LMT
781+
Sun Feb 16 17:32:01 1698LMT
782+
Fri Feb 16 17:32:01 1798LMT
778783
Wed Feb 16 17:32:01 1898 PST
779784
Mon Feb 16 17:32:01 1998 PST
780785
Sun Feb 16 17:32:01 2098 PST
@@ -840,12 +845,12 @@ SELECT d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
840845
Wed Feb 14 17:32:01 1996 PST
841846
Thu Feb 15 17:32:01 1996 PST
842847
Fri Feb 16 17:32:01 1996 PST
843-
Mon Feb 16 17:32:01 0098PST BC
844-
Thu Feb 16 17:32:01 0096PST
845-
Tue Feb 16 17:32:01 0596PST
846-
Sun Feb 16 17:32:01 1096PST
847-
Thu Feb 16 17:32:01 1696PST
848-
Tue Feb 16 17:32:01 1796PST
848+
Mon Feb 16 17:32:01 0098LMT BC
849+
Thu Feb 16 17:32:01 0096LMT
850+
Tue Feb 16 17:32:01 0596LMT
851+
Sun Feb 16 17:32:01 1096LMT
852+
Thu Feb 16 17:32:01 1696LMT
853+
Tue Feb 16 17:32:01 1796LMT
849854
Sun Feb 16 17:32:01 1896 PST
850855
Fri Feb 16 17:32:01 1996 PST
851856
Thu Feb 16 17:32:01 2096 PST
@@ -2124,7 +2129,7 @@ SELECT '2020-10-05'::timestamptz > '2202020-10-05'::date as f;
21242129
SELECT '4714-11-24 BC'::date::timestamptz;
21252130
timestamptz
21262131
---------------------------------
2127-
Mon Nov 24 00:00:00 4714PST BC
2132+
Mon Nov 24 00:00:00 4714LMT BC
21282133
(1 row)
21292134

21302135
SET TimeZone = 'UTC-2';
@@ -2702,13 +2707,13 @@ RESET DateStyle;
27022707
SELECT to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
27032708
to_timestamp
27042709
------------------------------
2705-
Sat Feb 16 08:14:30 0097PST
2710+
Sat Feb 16 08:14:30 0097LMT
27062711
(1 row)
27072712

27082713
SELECT to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
27092714
to_timestamp
27102715
------------------------------
2711-
Sat Feb 16 08:14:30 0097PST
2716+
Sat Feb 16 08:14:30 0097LMT
27122717
(1 row)
27132718

27142719
SELECT to_timestamp('2011$03!18 23_38_15', 'YYYY-MM-DD HH24:MI:SS');
@@ -2745,7 +2750,7 @@ SELECT to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16',
27452750
SELECT to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
27462751
to_timestamp
27472752
------------------------------
2748-
Sat Aug 21 00:00:00 1582PST
2753+
Sat Aug 21 00:00:00 1582LMT
27492754
(1 row)
27502755

27512756
SELECT to_timestamp('15 "text between quote marks" 98 54 45',
@@ -2809,7 +2814,7 @@ SELECT to_timestamp('1997 AD 11 16', 'YYYY BC MM DD');
28092814
SELECT to_timestamp('1997 BC 11 16', 'YYYY BC MM DD');
28102815
to_timestamp
28112816
---------------------------------
2812-
Tue Nov 16 00:00:00 1997PST BC
2817+
Tue Nov 16 00:00:00 1997LMT BC
28132818
(1 row)
28142819

28152820
SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
@@ -2821,7 +2826,7 @@ SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
28212826
SELECT to_timestamp('1997 B.C. 11 16', 'YYYY B.C. MM DD');
28222827
to_timestamp
28232828
---------------------------------
2824-
Tue Nov 16 00:00:00 1997PST BC
2829+
Tue Nov 16 00:00:00 1997LMT BC
28252830
(1 row)
28262831

28272832
SELECT to_timestamp('9-1116', 'Y-MMDD');
@@ -3091,19 +3096,19 @@ SELECT to_date('-44-02-01 BC','YYYY-MM-DD BC');
30913096
SELECT to_timestamp('44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
30923097
to_timestamp
30933098
---------------------------------
3094-
Fri Feb 01 11:12:13 0044PST BC
3099+
Fri Feb 01 11:12:13 0044LMT BC
30953100
(1 row)
30963101

30973102
SELECT to_timestamp('-44-02-01 11:12:13','YYYY-MM-DD HH24:MI:SS');
30983103
to_timestamp
30993104
---------------------------------
3100-
Fri Feb 01 11:12:13 0044PST BC
3105+
Fri Feb 01 11:12:13 0044LMT BC
31013106
(1 row)
31023107

31033108
SELECT to_timestamp('-44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
31043109
to_timestamp
31053110
------------------------------
3106-
Mon Feb 01 11:12:13 0044PST
3111+
Mon Feb 01 11:12:13 0044LMT
31073112
(1 row)
31083113

31093114
--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp