Index: src/timezone/pgtz.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/timezone/pgtz.c,v retrieving revision 1.32 diff -c -r1.32 pgtz.c *** src/timezone/pgtz.c 29 May 2005 04:23:07 -0000 1.32 --- src/timezone/pgtz.c 4 Jun 2005 13:02:03 -0000 *************** *** 162,175 **** struct tm *systm; struct pg_tm *pgtm; char cbuf[TZ_STRLEN_MAX + 1]; ! pg_tz *tz; ! tz = pg_tzset(tzname); ! if (!tz) ! return -1; /* can't handle the TZ name at all */ /* Reject if leap seconds involved */ ! if (!tz_acceptable(tz)) { elog(DEBUG4, "Reject TZ \"%s\": uses leap seconds", tzname); return -1; --- 162,180 ---- struct tm *systm; struct pg_tm *pgtm; char cbuf[TZ_STRLEN_MAX + 1]; ! pg_tz tz; ! ! /* Load timezone directly. Don't use pg_tzset, because we don't want ! * all timezones loaded in the cache at startup. */ ! if (tzload(tzname, &tz.state) != 0) { ! if (tzname[0] == ':' || tzparse(tzname, &tz.state, FALSE) != 0) { ! return -1; /* can't handle the TZ name at all */ ! } ! } /* Reject if leap seconds involved */ ! if (!tz_acceptable(&tz)) { elog(DEBUG4, "Reject TZ \"%s\": uses leap seconds", tzname); return -1; *************** *** 179,185 **** for (i = 0; i < tt->n_test_times; i++) { pgtt = (pg_time_t) (tt->test_times[i]); ! pgtm = pg_localtime(&pgtt, tz); if (!pgtm) return -1; /* probably shouldn't happen */ systm = localtime(&(tt->test_times[i])); --- 184,190 ---- for (i = 0; i < tt->n_test_times; i++) { pgtt = (pg_time_t) (tt->test_times[i]); ! pgtm = pg_localtime(&pgtt, &tz); if (!pgtm) return -1; /* probably shouldn't happen */ systm = localtime(&(tt->test_times[i]));