Re: [pgsql-hackers-win32] Weird new time zone - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: [pgsql-hackers-win32] Weird new time zone
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE1716D5@algol.sollentuna.se
Whole thread Raw
Responses Re: [pgsql-hackers-win32] Weird new time zone
List pgsql-hackers
>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

pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: possibly updating techdocs; mysql2pgsql on gborg
Next
From: Peter Eisentraut
Date:
Subject: Re: Is "trust" really a good default?