mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Sync tzload() and tzparse() APIs with IANA release tzcode2016c.
This brings us a bit closer to matching upstream, but since it affects files outside src/timezone/, we might choose not to back-patch it. Hence keep it separate from the main update patch.
This commit is contained in:
@ -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))
|
||||
{
|
||||
/* This really, really should not happen ... */
|
||||
elog(ERROR, "could not initialize GMT time zone");
|
||||
@ -266,7 +266,7 @@ pg_tzset(const char *name)
|
||||
}
|
||||
else if (tzload(uppername, canonname, &tzstate, true) != 0)
|
||||
{
|
||||
if (uppername[0] == ':' || tzparse(uppername, &tzstate, false) != 0)
|
||||
if (uppername[0] == ':' || !tzparse(uppername, &tzstate, false))
|
||||
{
|
||||
/* Unknown timezone. Fail our call instead of loading GMT! */
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user