Dismas has asked for the wisdom of the Perl Monks concerning the following question:

Hey, Monks, Wizards & other wiseguys!

Further research has clarified the question. That is, I tripped over the answer looking for something else. BTAIM, I've discovered that my assumption about the value "-360" was correct. Thanks to all who've given this some thought, and especially to DragonChild for answering.

Regards.


There's some confusing going on regarding UTC in Win32. MSDN explains the "-XXXX" part of the format "yyyymmddhhmmss.ssssss-XXXX" as being +/-hhmm from Zulu time (GMT). Well, that's peachy, BUT...

When I run the Perl code that brings in UTC date,

$date = $foo->LocalDateTime;

(where $foo is appropriately defined--don't tell me, I know, but it works), I don't get back four Xs, only three (specifically, "-360"). Now it happens that I'm in Illinois, using CST, which happens to be Z-6 hours, and six hours just happens to be 360 minutes. So my question is this: is it just a coincidental artifact that my time string reads "yyyymmddhhmmss.ssssss-360" or is the -360 truly the delta from Zulu time, but expressed in minutes? In other words, in California (using PST), would this come back with "-480" (Z-8 hours)?

I need the straight scoop on this 'cuz we're looking at a nation-wide usage here, and I dasn't hose up time settings by making an incorrect assumption about this.

Thanks, all!

Dismas

Replies are listed 'Best First'.
Re: Win32 UTC handling
by dragonchild (Archbishop) on Feb 14, 2005 at 16:35 UTC
    Why don't you consult the documentation for the library that's providing the LocalDateTime() function/method. Since you don't tell us where that comes from, it's a little hard for us to help you.

    Additionally, you might want to provide other information, such as your Perl version as well as your OS version. I suspect that the LocalDateTime function may have changed between Windows98 and WindowsXP Pro, for example.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.