Hi!
I've corrected the problem. I just release a new version, but it'll be
tomorrow before it's distributed on CPAN. You can also get it
immediately from:
http://heather.osg.ufl.edu/Date-Manip.tar.gz
Works fine on Linux.
But on ActiveState Perl (perl 5.10) on a german language installation of
Windows XP, Date::Manip 6.04 dies during "use". Here's my complete example:
#!/usr/bin/perl -w
use strict;
use warnings;
use Date::Manip qw(Date_Init UnixDate);
It dies with:
ERROR: Date::Manip unable to determine Time Zone.
Died at C:/Perl/site/lib/Date/Manip/TZ.pm line 515, <DATA> line 335.
Compilation failed in require at C:\src\maplat_prodit\server\test.pl
line 5, <DATA> line 335.
BEGIN failed--compilation aborted at C:\src\maplat_prodit\server\test.pl
line 5, <DATA> line 335.
Here's the relevant Registry key (as exported by regedit):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"Bias"=dword:ffffffc4
"StandardName"="Westeuropäische Normalzeit"
"StandardBias"=dword:00000000
"StandardStart"=hex:00,00,0a,00,05,00,03,00,00,00,00,00,00,00,00,00
"DaylightName"="Westeuropäische Sommerzeit"
"DaylightBias"=dword:ffffffc4
"DaylightStart"=hex:00,00,03,00,05,00,02,00,00,00,00,00,00,00,00,00
"ActiveTimeBias"=dword:ffffffc4
(My timezone is CET / Central European Time / UTC+1)
possibly relevant "systeminfo" output (translated):
Operating system: Microsoft Windows XP Professional
OS Version: 5.1.2600 Service Pack 2 Build 2600
Configuration: Member of a domain
Could the problem be that you access the StandardName (which may fails
due to the umlauts)? Would it be possible to use "Bias" as base of a
rough guess as to the currect time zone (0xffff minus 0xffc4 plus 1 =>
60 minutes?) as a last fallback method?.
On XP, there's also the command
w32tm /tz
which outputs:
R:\>w32tm /tz
Zeitzone: Aktuell:TIME_ZONE_ID_STANDARD Bias: -60 Min. (UTC=Ortszeit+Bias)
[Standardname:"Westeuropäische Normalzeit" Bias:0 Min. Datum:(M:10
T:5 DoW:0)]
[Sommerzeitname:"Westeuropäische Sommerzeit" Bias:-60 Min. Datum:(M:3
T:5 DoW:0)]
Relevant is the part "TIME_ZONE_ID_STANDARD Bias: -60 Min."
This is the negative offset to UTC, because it calculates UTC =
localtime + Bias
This value is supposedly the same the "Bias" setting in the registry.
LG
Rene