Re: localtime() for win32 problem.
От | Magnus Hagander |
---|---|
Тема | Re: localtime() for win32 problem. |
Дата | |
Msg-id | 6BCB9D8A16AC4241919521715F4D8BCE4569B8@algol.sollentuna.se обсуждение исходный текст |
Ответ на | localtime() for win32 problem. ("Korea PostgreSQL Users' Group" <pgsql-kr@postgresql.or.kr>) |
Ответы |
Re: localtime() for win32 problem.
|
Список | pgsql-hackers-win32 |
>> ... 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, pgtm->tm_zone, cbuf); return i; } } That's what you wanted tested, right? //Magnus
В списке pgsql-hackers-win32 по дате отправления: