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

Commit66b737c

Browse files
committed
Be more wary in choice of timezone names to test make_timestamptz with.
America/Metlakatla hasn't been in the IANA database all that long, sosome installations might not have it. It does seem worthwhile to testwith a fractional-minute GMT offset, but we can get that from almostany pre-1900 date; I chose Europe/Paris, whose LMT offset from Greenwichshould be pretty darn well established.Also, assuming that Mars/Mons_Olympus will never be in the IANA databaseseems less than future-proof, so let's use a more fanciful location forthe bad-zone-name check.Per complaint from Christoph Berg.
1 parent73011f3 commit66b737c

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

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

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,7 +1758,7 @@ SELECT make_timestamptz(1973, 07, 15, 08, 15, 55.33, '+2') = '1973-07-15 08:15:5
17581758
t
17591759
(1 row)
17601760

1761-
-- full timezonename
1761+
-- full timezonenames
17621762
SELECT make_timestamptz(2014, 12, 10, 0, 0, 0, 'Europe/Prague') = timestamptz '2014-12-10 00:00:00 Europe/Prague';
17631763
?column?
17641764
----------
@@ -1777,20 +1777,14 @@ SELECT make_timestamptz(1846, 12, 10, 0, 0, 0, 'Asia/Manila') AT TIME ZONE 'UTC'
17771777
Wed Dec 09 15:56:00 1846
17781778
(1 row)
17791779

1780-
SELECT make_timestamptz(1866, 12, 10, 0, 0, 0, 'America/Metlakatla') AT TIME ZONE 'UTC';
1780+
SELECT make_timestamptz(1881, 12, 10, 0, 0, 0, 'Europe/Paris') AT TIME ZONE 'UTC';
17811781
timezone
17821782
--------------------------
1783-
Sun Dec 0908:46:18 1866
1783+
Fri Dec 0923:50:39 1881
17841784
(1 row)
17851785

1786-
SELECT make_timestamptz(1901, 12, 10, 0, 0, 0, 'America/Metlakatla') AT TIME ZONE 'UTC';
1787-
timezone
1788-
--------------------------
1789-
Tue Dec 10 08:00:00 1901
1790-
(1 row)
1791-
1792-
SELECT make_timestamptz(2014, 12, 10, 0, 0, 0, 'Mars/Mons_Olympus');
1793-
ERROR: time zone "Mars/Mons_Olympus" not recognized
1786+
SELECT make_timestamptz(1910, 12, 24, 0, 0, 0, 'Nehwon/Lankhmar');
1787+
ERROR: time zone "Nehwon/Lankhmar" not recognized
17941788
-- abbreviations
17951789
SELECT make_timestamptz(2008, 12, 10, 10, 10, 10, 'CLST');
17961790
make_timestamptz

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,12 @@ SELECT make_timestamptz(2014, 12, 10, 10, 10, 10, '-16');
277277
-- should be true
278278
SELECT make_timestamptz(1973,07,15,08,15,55.33,'+2')='1973-07-15 08:15:55.33+02'::timestamptz;
279279

280-
-- full timezonename
280+
-- full timezonenames
281281
SELECT make_timestamptz(2014,12,10,0,0,0,'Europe/Prague')=timestamptz'2014-12-10 00:00:00 Europe/Prague';
282282
SELECT make_timestamptz(2014,12,10,0,0,0,'Europe/Prague') ATTIME ZONE'UTC';
283283
SELECT make_timestamptz(1846,12,10,0,0,0,'Asia/Manila') ATTIME ZONE'UTC';
284-
SELECT make_timestamptz(1866,12,10,0,0,0,'America/Metlakatla') ATTIME ZONE'UTC';
285-
SELECT make_timestamptz(1901,12,10,0,0,0,'America/Metlakatla') ATTIME ZONE'UTC';
286-
SELECT make_timestamptz(2014,12,10,0,0,0,'Mars/Mons_Olympus');
284+
SELECT make_timestamptz(1881,12,10,0,0,0,'Europe/Paris') ATTIME ZONE'UTC';
285+
SELECT make_timestamptz(1910,12,24,0,0,0,'Nehwon/Lankhmar');
287286

288287
-- abbreviations
289288
SELECT make_timestamptz(2008,12,10,10,10,10,'CLST');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp