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

Commita5fcfa8

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 parent7abda82 commita5fcfa8

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
@@ -4815,8 +4815,17 @@ pg_timezone_names(PG_FUNCTION_ARGS)
48154815
&tzoff,&tm,&fsec,&tzn,tz)!=0)
48164816
continue;/* ignore if conversion fails */
48174817

4818-
/* Ignore zic's rather silly "Factory" time zone */
4819-
if (tzn&&strcmp(tzn,"Local time zone must be set--see zic manual page")==0)
4818+
/*
4819+
* Ignore zic's rather silly "Factory" time zone. The long string
4820+
* about "see zic manual page" is used in tzdata versions before
4821+
* 2016g; we can drop it someday when we're pretty sure no such data
4822+
* exists in the wild on platforms using --with-system-tzdata. In
4823+
* 2016g and later, the time zone abbreviation "-00" is used for
4824+
* "Factory" as well as some invalid cases, all of which we can
4825+
* reasonably omit from the pg_timezone_names view.
4826+
*/
4827+
if (tzn&& (strcmp(tzn,"-00")==0||
4828+
strcmp(tzn,"Local time zone must be set--see zic manual page")==0))
48204829
continue;
48214830

48224831
/* Found a displayable zone */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp