Hello $Bill,
I love reading your answers to other people's problems.  I hope I can
help you.
Microsoft announced that there is a patch to the MSVCRT.DLL which may be
used by the perl executable.
I don't know the windows equivalent to ldd to be sure MSVCRT.DLL is used
by perl, but if it is, then Microsoft's
KB article number 932950  (URL: http://support.microsoft.com/kb/932590)
seems directly related to the issue
you describe.

Hope this helps,
Joe Dial
"Long Time Lurker"

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bill Luebkert
Sent: Tuesday, March 13, 2007 10:25 AM
To: [EMAIL PROTECTED]
Cc: Jan Dubois
Subject: localtime failing on DST change

My 'localtime' function output doesn't reflect DST since the Sunday
changeover.

System: XP Pro; Perl B811

The earlier DST change time seems to be picked up OK by Windoze clock.
There
was some mention of the table changes by Microsoft I believe and there
is some
info at http://support.microsoft.com/gp/dst_hu1 based on user type.

GetTimeZoneInformation API call looks OK to me - here's all the
pertinent
output:

        ActiveTime:
                '-52588' (BIN)
        DaylightBias:
                '-60' (DW)
        StandardBias:
                '0' (DW)
        DaylightName:
                'Pacific Daylight Time' (SZ)
        StandardStart:
                '720896' (BIN)
        ActiveTimeBias:
                '420' (DW)
        Bias:
                '480' (DW)
        DaylightStart:
                '196608' (BIN)
        StandardName:
                'Pacific Standard Time' (SZ)

        GetTimeZoneInformation ret: 2 (Daylight Savings Time)

        UTC bias from localtime: 480

        StandardName: Pacific Standard Time
        SYear: 0
        SMonth: 11
        SDayOfWeek: 0
        SDay: 1
        SHour: 2
        SMinute: 0
        SSecond: 0
        SMilliseconds: 0
        StandardBias: 0

        DaylightName: Pacific Daylight Time
        DYear: 0
        DMonth: 3
        DDayOfWeek: 0
        DDay: 2
        DHour: 2
        DMinute: 0
        DSecond: 0
        DaylightBias: -60

        StandardDate: first Sunday of November at 2
        StandardDate-raw: 0-11-0-1-2-0-0-0
        DaylightDate: second Sunday of March at 2
        DaylightDate-raw: 0-3-0-2-2-0-0-0

However localtime returns the following:

        Perl localtime: Tue Mar 13 05:56:54 2007

Actual time is 06:56 PDT not 05:56 PST.

        GMT  : 54 56 13 13 2 107 2 71 0
        GMT  : yr=2007, mo=3, day=13, hr=13, min=56, sec=54, DST=no

        Local: 54 56 5 13 2 107 2 71 0
        Local: yr=2007, mo=3, day=13, hr=5, min=56, sec=54, DST=no

Note the isdst field (last element) is set to 0 (off) and the time is
off
by an hour.

Registry SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation shows
the
following values:

        ActiveTime:
                '-52588' (BIN)
        DaylightBias:
                '-60' (DW)
        StandardBias:
                '0' (DW)
        DaylightName:
                'Pacific Daylight Time' (SZ)
        StandardStart:
                '720896' (BIN)
        ActiveTimeBias:
                '420' (DW)
        Bias:
                '480' (DW)
        DaylightStart:
                '196608' (BIN)
        StandardName:
                'Pacific Standard Time' (SZ)

Microsoft has this info
http://msdn2.microsoft.com/en-us/vstudio/bb264729.aspx
and other Q&A :

        Q: I'm a C++ developer who uses the TZ environment variable,
what does this
        mean to me?

        A: For customers who rely on the TZ environment variable for the
DST
        information, they will get outdated DST information for 2007 and
beyond (i.e.,
        they will get DST information according to the previous system).
Microsoft is
        currently working on a fix for this issue and will post
information about its
        availability on the Visual Studio Support page. In the interim,
developers are
        advised to test their applications to determine the impact of
the DST update
        on their applications. This issue is also fixed in Visual Studio
code name
        "Orcas".
        Support page:
http://msdn2.microsoft.com/en-us/vstudio/aa718682.aspx
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to