diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-02-16 21:16:04 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-02-16 21:16:04 +0000 |
commit | 0171e72d4da2da7974ff13c63130e2175cebee88 (patch) | |
tree | c7cbf0a5a943ddbe374b3b838f3679be1f1c0014 /src/timezone/pgtz.c | |
parent | 2f67722dda9a46e82bad6807a12401dd7839910c (diff) |
Update timezone code to track the upstream changes since 2003. In particular
this adds support for 64-bit tzdata files, which is needed to support DST
calculations beyond 2038. Add a regression test case to give some minimal
confidence that that really works.
Heikki Linnakangas
Diffstat (limited to 'src/timezone/pgtz.c')
-rw-r--r-- | src/timezone/pgtz.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c index 3691d296cab..b951830b026 100644 --- a/src/timezone/pgtz.c +++ b/src/timezone/pgtz.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.58 2008/02/11 19:55:11 mha Exp $ + * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.59 2008/02/16 21:16:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -287,7 +287,7 @@ score_timezone(const char *tzname, struct tztry * tt) * Load timezone directly. Don't use pg_tzset, because we don't want all * timezones loaded in the cache at startup. */ - if (tzload(tzname, NULL, &tz.state) != 0) + if (tzload(tzname, NULL, &tz.state, TRUE) != 0) { if (tzname[0] == ':' || tzparse(tzname, &tz.state, FALSE) != 0) { @@ -1191,7 +1191,7 @@ pg_tzset(const char *name) return &tzp->tz; } - if (tzload(uppername, canonname, &tzstate) != 0) + if (tzload(uppername, canonname, &tzstate, TRUE) != 0) { if (uppername[0] == ':' || tzparse(uppername, &tzstate, FALSE) != 0) { @@ -1463,7 +1463,8 @@ pg_tzenumerate_next(pg_tzenum *dir) * Load this timezone using tzload() not pg_tzset(), so we don't fill * the cache */ - if (tzload(fullname + dir->baselen, dir->tz.TZname, &dir->tz.state) != 0) + if (tzload(fullname + dir->baselen, dir->tz.TZname, &dir->tz.state, + TRUE) != 0) { /* Zone could not be loaded, ignore it */ continue; |