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

Commitb8ea0f6

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 parentf64074c commitb8ea0f6

File tree

7 files changed

+111
-101
lines changed

7 files changed

+111
-101
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
@@ -576,11 +576,11 @@ make check NO_LOCALE=1
576576
<para>
577577
Most of the date and time results are dependent on the time zone
578578
environment. The reference files are generated for time zone
579-
<literal>PST8PDT</literal> (Berkeley, California), and there will be
579+
<literal>America/Los_Angeles</literal>, and there will be
580580
apparent failures if the tests are not run with that time zone setting.
581581
The regression test driver sets environment variable
582-
<envar>PGTZ</envar> to <literal>PST8PDT</literal>, which normally
583-
ensures proper results.
582+
<envar>PGTZ</envar> to <literal>America/Los_Angeles</literal>,
583+
which normallyensures proper results.
584584
</para>
585585
</sect2>
586586

‎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: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
-- HOROLOGY
33
--
44
SHOW TimeZone; -- Many of these tests depend on the prevailing settings
5-
TimeZone
6-
----------
7-
PST8PDT
5+
TimeZone
6+
---------------------
7+
America/Los_Angeles
88
(1 row)
99

1010
SHOW DateStyle;
@@ -1038,12 +1038,12 @@ SELECT d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
10381038
Sat Feb 14 17:32:01 1998 PST
10391039
Sun Feb 15 17:32:01 1998 PST
10401040
Mon Feb 16 17:32:01 1998 PST
1041-
Thu Feb 16 17:32:01 0096PST BC
1042-
Sun Feb 16 17:32:01 0098PST
1043-
Fri Feb 16 17:32:01 0598PST
1044-
Wed Feb 16 17:32:01 1098PST
1045-
Sun Feb 16 17:32:01 1698PST
1046-
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
10471047
Wed Feb 16 17:32:01 1898 PST
10481048
Mon Feb 16 17:32:01 1998 PST
10491049
Sun Feb 16 17:32:01 2098 PST
@@ -1109,12 +1109,12 @@ SELECT d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
11091109
Wed Feb 14 17:32:01 1996 PST
11101110
Thu Feb 15 17:32:01 1996 PST
11111111
Fri Feb 16 17:32:01 1996 PST
1112-
Mon Feb 16 17:32:01 0098PST BC
1113-
Thu Feb 16 17:32:01 0096PST
1114-
Tue Feb 16 17:32:01 0596PST
1115-
Sun Feb 16 17:32:01 1096PST
1116-
Thu Feb 16 17:32:01 1696PST
1117-
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
11181118
Sun Feb 16 17:32:01 1896 PST
11191119
Fri Feb 16 17:32:01 1996 PST
11201120
Thu Feb 16 17:32:01 2096 PST
@@ -2470,7 +2470,7 @@ SELECT '2020-10-05'::timestamptz > '2202020-10-05'::date as f;
24702470
SELECT '4714-11-24 BC'::date::timestamptz;
24712471
timestamptz
24722472
---------------------------------
2473-
Mon Nov 24 00:00:00 4714PST BC
2473+
Mon Nov 24 00:00:00 4714LMT BC
24742474
(1 row)
24752475

24762476
SET TimeZone = 'UTC-2';
@@ -3048,13 +3048,13 @@ RESET DateStyle;
30483048
SELECT to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
30493049
to_timestamp
30503050
------------------------------
3051-
Sat Feb 16 08:14:30 0097PST
3051+
Sat Feb 16 08:14:30 0097LMT
30523052
(1 row)
30533053

30543054
SELECT to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
30553055
to_timestamp
30563056
------------------------------
3057-
Sat Feb 16 08:14:30 0097PST
3057+
Sat Feb 16 08:14:30 0097LMT
30583058
(1 row)
30593059

30603060
SELECT to_timestamp('2011$03!18 23_38_15', 'YYYY-MM-DD HH24:MI:SS');
@@ -3091,7 +3091,7 @@ SELECT to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16',
30913091
SELECT to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
30923092
to_timestamp
30933093
------------------------------
3094-
Sat Aug 21 00:00:00 1582PST
3094+
Sat Aug 21 00:00:00 1582LMT
30953095
(1 row)
30963096

30973097
SELECT to_timestamp('15 "text between quote marks" 98 54 45',
@@ -3155,7 +3155,7 @@ SELECT to_timestamp('1997 AD 11 16', 'YYYY BC MM DD');
31553155
SELECT to_timestamp('1997 BC 11 16', 'YYYY BC MM DD');
31563156
to_timestamp
31573157
---------------------------------
3158-
Tue Nov 16 00:00:00 1997PST BC
3158+
Tue Nov 16 00:00:00 1997LMT BC
31593159
(1 row)
31603160

31613161
SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
@@ -3167,7 +3167,7 @@ SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
31673167
SELECT to_timestamp('1997 B.C. 11 16', 'YYYY B.C. MM DD');
31683168
to_timestamp
31693169
---------------------------------
3170-
Tue Nov 16 00:00:00 1997PST BC
3170+
Tue Nov 16 00:00:00 1997LMT BC
31713171
(1 row)
31723172

31733173
SELECT to_timestamp('9-1116', 'Y-MMDD');
@@ -3495,19 +3495,19 @@ SELECT to_date('-44-02-01 BC','YYYY-MM-DD BC');
34953495
SELECT to_timestamp('44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
34963496
to_timestamp
34973497
---------------------------------
3498-
Fri Feb 01 11:12:13 0044PST BC
3498+
Fri Feb 01 11:12:13 0044LMT BC
34993499
(1 row)
35003500

35013501
SELECT to_timestamp('-44-02-01 11:12:13','YYYY-MM-DD HH24:MI:SS');
35023502
to_timestamp
35033503
---------------------------------
3504-
Fri Feb 01 11:12:13 0044PST BC
3504+
Fri Feb 01 11:12:13 0044LMT BC
35053505
(1 row)
35063506

35073507
SELECT to_timestamp('-44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
35083508
to_timestamp
35093509
------------------------------
3510-
Mon Feb 01 11:12:13 0044PST
3510+
Mon Feb 01 11:12:13 0044LMT
35113511
(1 row)
35123512

35133513
--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp