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

Commit1b145a7

Browse files
committed
Suppress "Factory" zone in pg_timezone_names view for tzdata >= 2016g.
IANA got rid of the really silly "abbreviation" and replaced it with onethat's only moderately silly. But it's still pointless, so keep on notshowing it.
1 parent0c2f4c5 commit1b145a7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎src/backend/utils/adt/datetime.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4957,8 +4957,17 @@ pg_timezone_names(PG_FUNCTION_ARGS)
49574957
&tzoff,&tm,&fsec,&tzn,tz)!=0)
49584958
continue;/* ignore if conversion fails */
49594959

4960-
/* Ignore zic's rather silly "Factory" time zone */
4961-
if (tzn&&strcmp(tzn,"Local time zone must be set--see zic manual page")==0)
4960+
/*
4961+
* Ignore zic's rather silly "Factory" time zone. The long string
4962+
* about "see zic manual page" is used in tzdata versions before
4963+
* 2016g; we can drop it someday when we're pretty sure no such data
4964+
* exists in the wild on platforms using --with-system-tzdata. In
4965+
* 2016g and later, the time zone abbreviation "-00" is used for
4966+
* "Factory" as well as some invalid cases, all of which we can
4967+
* reasonably omit from the pg_timezone_names view.
4968+
*/
4969+
if (tzn&& (strcmp(tzn,"-00")==0||
4970+
strcmp(tzn,"Local time zone must be set--see zic manual page")==0))
49624971
continue;
49634972

49644973
/* Found a displayable zone */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp