>> ... change pgtz.c following lines 184 and 304 to
>> correctly deal with a NULL return from the native localtime.
>Ah, that would seem to be the problem. Also, has anyone rechecked with
>this version of pgtz to see if we can dispense with testing time zone
>name equality and still pick the right zone on Windows?
Well, it puts me in "Africa/Ceuta" instead of "Europe/Stockholm"... It
picked a couple of TZs correctly in the US, but when I set it to -7
Arizona, the entire postmaster fails to start with "FATAL: postmaster:
could not locate matching postgres executable". (Other -7 timezones do
work. -7 Arizona works with the check being in there). I had it die on
one other timezone I tested in the US, I thin kit was Atlantic time.
I tested by #ifdefing out the following code from pgtz.c:
if (systm->tm_isdst >= 0)
/* Check match of zone names, too */
if (pgtm->tm_zone == NULL)
return -1; /* probably
shouldn't happen */
memset(cbuf, 0, sizeof(cbuf));
strftime(cbuf, sizeof(cbuf) - 1, "%Z", systm);
/* zone abbr */
if (strcmp(TZABBREV(cbuf), pgtm->tm_zone) != 0)
elog(DEBUG4, "TZ \"%s\" scores %d: at
%ld \"%s\" versus \"%s\"",
tzname, i, (long) pgtt,
That's what you wanted tested, right?
pgsql-hackers-win32 by date
|Next:||From: Tom Lane||Date: 2004-07-29 17:49:49|
|Subject: Re: localtime() for win32 problem. |
|Previous:||From: Tom Lane||Date: 2004-07-29 17:25:19|
|Subject: Re: [HACKERS] win32 crash in initdb |