Re: [HACKERS] Weird new time zone

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] Weird new time zone
Date: 2004-07-15 21:12:32
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE1716D5@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32

>It occurs to me that with a check this thorough, we might be
>able to finesse the problem on Windows with the system
>returning very nonstandard timezone abbreviations. That is,
>we might simply "#ifndef WIN32" the matching of zone names in
>try_timezone(). However I do not know whether this would yield
>reasonable results for all the zones supported by Windows.
>Does anyone want to try it?

I tried this, basically changing to:
#ifndef WIN32
if (strcmp(TZABBREV(cbuf), pgtm->tm_zone) != 0)
{
elog(DEBUG4, "Reject TZ \"%s\": at %ld
\"%s\" versus \"%s\"",
tzname, (long) pgtt,
pgtm->tm_zone, cbuf);
return false;
}
#endif

This is what you meant, rihgt?

It does *not* pick up my timezone. The following possibilities are
rejected per:
DEBUG: Reject TZ "Europe/Stockholm": at 16844400 1970-07-15 00:00:00
std versus 1970-07-15 01:00:00 dst
DEBUG: Reject TZ "CET": at 16844400 1970-07-15 00:00:00 std versus
1970-07-15 01:00:00 dst
DEBUG: Reject TZ "MET": at 16844400 1970-07-15 00:00:00 std versus
1970-07-15 01:00:00 dst
DEBUG: Reject TZ "Etc/GMT-1": at 16844400 1970-07-15 00:00:00 std
versus 1970-07-15 01:00:00 dst

It didn't pick it up before either, but it didn't get better.

Would probably be good if someone where it actally picks up the correct
timezone could test this as well. Or if someone knows a TZ that matches
and I can change my syste mtemporarily. Just don't want to have to test
through each and every timezone..

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-07-15 21:17:47 Re: Is "trust" really a good default?
Previous Message Josh Berkus 2004-07-15 20:37:13 Re: possibly updating techdocs; mysql2pgsql on gborg

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Laurent Ballester 2004-07-15 21:36:18 Re: postgresql as windows 2000 service problem
Previous Message Merlin Moncure 2004-07-15 19:15:32 Re: Saludando a postgress win32