diff options
author | Tom Lane | 2016-03-28 19:10:17 +0000 |
---|---|---|
committer | Tom Lane | 2016-03-28 19:10:17 +0000 |
commit | 1c1a7cbd6a1600c97dfcd9b5dc78a23b5db9bbf6 (patch) | |
tree | 83a3722b946a8610306512bcfb2ccc77be745e84 /src/timezone/pgtz.c | |
parent | e5a4dea80f2506a7a565508e48aaa52296ff410a (diff) |
Sync our copy of the timezone library with IANA release tzcode2016c.
We hadn't done this in about six years, which proves to have been a mistake
because there's been a lot of code churn upstream, making the merge rather
painful. But putting it off any further isn't going to lessen the pain,
and there are at least two incompatible changes that we need to absorb
before someone starts complaining that --with-system-tzdata doesn't work
at all on their platform, or we get blindsided by a tzdata release that
our out-of-date zic can't compile. Last week's "time zone abbreviation
differs from POSIX standard" mess was a wake-up call in that regard.
This is a sufficiently large patch that I'm afraid to back-patch it
immediately, though the foregoing considerations imply that we probably
should do so eventually. For the moment, just put it in HEAD so that
it can get some testing. Maybe we can wait till the end of the 9.6
beta cycle before deeming it okay.
Diffstat (limited to 'src/timezone/pgtz.c')
-rw-r--r-- | src/timezone/pgtz.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c index baf9733395d..c28e6dbfad8 100644 --- a/src/timezone/pgtz.c +++ b/src/timezone/pgtz.c @@ -256,7 +256,7 @@ pg_tzset(const char *name) */ if (strcmp(uppername, "GMT") == 0) { - if (tzparse(uppername, &tzstate, TRUE) != 0) + if (tzparse(uppername, &tzstate, true) != 0) { /* This really, really should not happen ... */ elog(ERROR, "could not initialize GMT time zone"); @@ -264,9 +264,9 @@ pg_tzset(const char *name) /* Use uppercase name as canonical */ strcpy(canonname, uppername); } - else if (tzload(uppername, canonname, &tzstate, TRUE) != 0) + else if (tzload(uppername, canonname, &tzstate, true) != 0) { - if (uppername[0] == ':' || tzparse(uppername, &tzstate, FALSE) != 0) + if (uppername[0] == ':' || tzparse(uppername, &tzstate, false) != 0) { /* Unknown timezone. Fail our call instead of loading GMT! */ return NULL; @@ -460,7 +460,7 @@ pg_tzenumerate_next(pg_tzenum *dir) * the cache */ if (tzload(fullname + dir->baselen, dir->tz.TZname, &dir->tz.state, - TRUE) != 0) + true) != 0) { /* Zone could not be loaded, ignore it */ continue; |