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

Commitaac0384

Browse files
committed
Avoid using timezone Asia/Manila in regression tests.
The freshly-released 2025a version of tzdata has a refined estimatefor the longitude of Manila, changing their value for LMT inpre-standardized-timezone days. This changes the output of one ofour test cases. Since we need to be able to run with system tzdatafiles that may or may not contain this update, we'd better stopmaking that specific test.I switched it to use Asia/Singapore, which has a roughly similar UTCoffset. That LMT value hasn't changed in tzdb since 2003, so we canhope that it's well established.I also noticed that this set of make_timestamptz tests only exerciseszones east of Greenwich, which seems rather sad, and was not theoriginal intent AFAICS. (We've already changed these tests onceto stabilize their results across tzdata updates, cf66b737c;it looks like I failed to consider the UTC-offset-sign aspect then.)To improve that, add a test with Pacific/Honolulu. That LMT offsetis also quite old in tzdb, so we'll cross our fingers that it doesn'tget improved.Reported-by: Christoph Berg <cb@df7cb.de>Discussion:https://postgr.es/m/Z46inkznCxesvDEb@msg.df7cb.deBackpatch-through: 13
1 parenta2d4f80 commitaac0384

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

‎src/include/datatype/timestamp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ typedef struct
9696
/*
9797
* We allow numeric timezone offsets up to 15:59:59 either way from Greenwich.
9898
* Currently, the record holders for wackiest offsets in actual use are zones
99-
* Asia/Manila, at -15:56:00 until 1844, and America/Metlakatla, at +15:13:42
99+
* Asia/Manila, at -15:56:08 until 1844, and America/Metlakatla, at +15:13:42
100100
* until 1867. If we were to reject such values we would fail to dump and
101101
* restore old timestamptz values with these zone settings.
102102
*/

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,10 +2277,16 @@ SELECT make_timestamptz(2014, 12, 10, 0, 0, 0, 'Europe/Prague') AT TIME ZONE 'UT
22772277
Tue Dec 09 23:00:00 2014
22782278
(1 row)
22792279

2280-
SELECT make_timestamptz(1846, 12, 10, 0, 0, 0, 'Asia/Manila') AT TIME ZONE 'UTC';
2280+
SELECT make_timestamptz(1881, 12, 10, 0, 0, 0, 'Asia/Singapore') AT TIME ZONE 'UTC';
22812281
timezone
22822282
--------------------------
2283-
Wed Dec 09 15:56:00 1846
2283+
Fri Dec 09 17:04:35 1881
2284+
(1 row)
2285+
2286+
SELECT make_timestamptz(1881, 12, 10, 0, 0, 0, 'Pacific/Honolulu') AT TIME ZONE 'UTC';
2287+
timezone
2288+
--------------------------
2289+
Sat Dec 10 10:31:26 1881
22842290
(1 row)
22852291

22862292
SELECT make_timestamptz(1881, 12, 10, 0, 0, 0, 'Europe/Paris') AT TIME ZONE 'UTC';

‎src/test/regress/sql/timestamptz.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,8 @@ SELECT make_timestamptz(1973, 07, 15, 08, 15, 55.33, '+2') = '1973-07-15 08:15:5
407407
-- full timezone names
408408
SELECT make_timestamptz(2014,12,10,0,0,0,'Europe/Prague')=timestamptz'2014-12-10 00:00:00 Europe/Prague';
409409
SELECT make_timestamptz(2014,12,10,0,0,0,'Europe/Prague') ATTIME ZONE'UTC';
410-
SELECT make_timestamptz(1846,12,10,0,0,0,'Asia/Manila') ATTIME ZONE'UTC';
410+
SELECT make_timestamptz(1881,12,10,0,0,0,'Asia/Singapore') ATTIME ZONE'UTC';
411+
SELECT make_timestamptz(1881,12,10,0,0,0,'Pacific/Honolulu') ATTIME ZONE'UTC';
411412
SELECT make_timestamptz(1881,12,10,0,0,0,'Europe/Paris') ATTIME ZONE'UTC';
412413
SELECT make_timestamptz(1910,12,24,0,0,0,'Nehwon/Lankhmar');
413414

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp