Skip to content

Commit a321543

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 one that's only moderately silly. But it's still pointless, so keep on not showing it.
1 parent ecbac3e commit a321543

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy