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

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

From
"Magnus Hagander"
Date:
> > Over-simplistic answers are not what we need here.  The
> data structure
> > you quote cannot even tell what DST transition dates Windows thinks
> > are in effect this year, let alone what it thinks the dates were in
> > past years.
>
> Yes, there are other calls for that, obviously.  I sent to
> Mr. Momjian a complete implementation of time zone stuff that
> uses Windows calls.
> It's also accurate to a fraction of a nanosecond millions of
> years into the past and the future.

You wouldn't happen to know if Windows internally has knowledge of the
many different DST rules in force at different years? See the other mail
about how it apparantly deals with Swedish DST - if that's common or a
single case?
If the OS doesn't have that knowledge, we can give up trying to get it
to tell us about it :-)


> The call that I showed returns the NAME OF THE TIME ZONE and
> also what it is called when you are in Daylight savings time.
>  I thought the issue under question was to find out what the
> time zone was.

Nope, we already had that. The issue is that the names are not the same
as the one used in zic/unix, so there is nothing to match on.

//Magnus



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

From
Tom Lane
Date:
"Magnus Hagander" <mha@sollentuna.net> writes:
>> I thought the issue under question was to find out what the 
>> time zone was.

> Nope, we already had that. The issue is that the names are not the same
> as the one used in zic/unix, so there is nothing to match on.

Right.  The problem we are actually faced with is to identify which of
the zic timezones is the best match for the system's timezone setting.
One of the issues is that it's not clear what "best" means...

At the moment I like Oliver Jowett's idea of defining "best" as "the one
that matches furthest back".
        regards, tom lane