> On Wed, 1 Dec 2004, John Siracusa wrote:
> 
> > On Wed, 1 Dec 2004 12:21:11, Dave Rolsky
<[EMAIL PROTECTED]> wrote:
> >> http://perladvent.org/2004/1st/
> >
> >> From the article:
> >
> >    # what year are we in?
> >    my $year = DateTime->now->year;
> >
> > Another victim of the failure to (attempt to)
default to local time! ;)
> 
> I think we've been over this more than enough.  If
someone gets "local" to 
> work on Win32, it might be considerable.  Until
then, it's not.

The time zone info is easy to get from the registry.
The problem is, it looks like "E. South America
Daylight Time", which is not compatible with the
Olson database.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\

However, there is a table that maps this name into
cities, here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Time
Zones\

(the key "Windows" can also be "Windows NT")

Anyone willing to make a
"Win32::DateTime::GetTimeZone" module?

- Flavio S. Glock


Reply via email to