<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl Script /Time function giving different results in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030879#M11129</link>
    <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;Here is the gmtime (using the gmtime() function) on the good server:&lt;BR /&gt;&lt;BR /&gt;46 Second&lt;BR /&gt;36 Minute&lt;BR /&gt;17 Hour&lt;BR /&gt;3 Day of Month&lt;BR /&gt;6 Month&lt;BR /&gt;107 Year&lt;BR /&gt;2 Day of week&lt;BR /&gt;183 Day of year&lt;BR /&gt;0 DST&lt;BR /&gt;&lt;BR /&gt;Here is the gmtime (using the gmtime() function) on the bad server:&lt;BR /&gt;&lt;BR /&gt;42 Second&lt;BR /&gt;37 Minute&lt;BR /&gt;17 Hour&lt;BR /&gt;3 Day of Month&lt;BR /&gt;6 Month&lt;BR /&gt;107 Year&lt;BR /&gt;2 Day of week&lt;BR /&gt;183 Day of year&lt;BR /&gt;0 DST&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Both have been posted here within seconds of running the script.</description>
    <pubDate>Tue, 03 Jul 2007 12:37:48 GMT</pubDate>
    <dc:creator>ABS_1</dc:creator>
    <dc:date>2007-07-03T12:37:48Z</dc:date>
    <item>
      <title>Perl Script /Time function giving different results</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030873#M11123</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Here is a simple perl script that displays the current system time:&lt;BR /&gt;==============================================&lt;BR /&gt;($seconds, $minutes, $hour, $dayofmonth, $month, $year, $dayofweek, $dayofyear, $dst) = localtime(time);&lt;BR /&gt;&lt;BR /&gt;print $seconds, " Second\n";&lt;BR /&gt;print $minutes, " Minute\n";&lt;BR /&gt;print $hour, " Hour\n";&lt;BR /&gt;print $dayofmonth, " Day of Month\n";&lt;BR /&gt;print $month, " Month\n";&lt;BR /&gt;print $year, " Year\n";&lt;BR /&gt;print $dayofweek, " Day of week\n";&lt;BR /&gt;print $dayofyear, " Day of year\n";&lt;BR /&gt;print $dst, " DST\n";&lt;BR /&gt;==============================================&lt;BR /&gt;&lt;BR /&gt;When executed on a Windows server, it gives  the correct "hour" value, but, when executed on another windows server (which is in the same timezone and physical location as the first server), it gives an "hour" value that is ahead by 5 hours.  &lt;BR /&gt;&lt;BR /&gt;Windows Admins are sure that the OS setup (as far as time/timezone/etc) is correct.  Why would I be seeing this difference?  Would this be something Windows related or the Perl related?</description>
      <pubDate>Mon, 02 Jul 2007 16:50:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030873#M11123</guid>
      <dc:creator>ABS_1</dc:creator>
      <dc:date>2007-07-02T16:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Script /Time function giving different results</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030874#M11124</link>
      <description>First, make certain that the two system's time are set correctly by using the Perl gmtime() function rather than localtime(). The output list is exactly the same except for dst -- which should be omitted.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Jul 2007 17:02:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030874#M11124</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-07-02T17:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Script /Time function giving different results</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030875#M11125</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;This is certainly related to your OS configuration and is NOT a Perl "problem".&lt;BR /&gt;&lt;BR /&gt;Perl uses the standard libc library routines which in turn are sensitive to the environment's timezone.&lt;BR /&gt;&lt;BR /&gt;You might examine what each server shows for:&lt;BR /&gt;&lt;BR /&gt;# perl -le 'print join " =L:G= ", scalar localtime, scalar gmtime' &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Jul 2007 17:10:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030875#M11125</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-07-02T17:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Script /Time function giving different results</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030876#M11126</link>
      <description>Hi Clay,&lt;BR /&gt;&lt;BR /&gt;With localtime(), I get the following output on the problem windows server:&lt;BR /&gt;&lt;BR /&gt;27 Second&lt;BR /&gt;6 Minute&lt;BR /&gt;18 Hour&lt;BR /&gt;3 Day of Month&lt;BR /&gt;6 Month&lt;BR /&gt;107 Year&lt;BR /&gt;2 Day of week&lt;BR /&gt;183 Day of year&lt;BR /&gt;1 DST&lt;BR /&gt;&lt;BR /&gt;With gmtime(), I get the following output on the problem windows server:&lt;BR /&gt;&lt;BR /&gt;59 Second&lt;BR /&gt;6 Minute&lt;BR /&gt;17 Hour&lt;BR /&gt;3 Day of Month&lt;BR /&gt;6 Month&lt;BR /&gt;107 Year&lt;BR /&gt;2 Day of week&lt;BR /&gt;183 Day of year&lt;BR /&gt;0 DST</description>
      <pubDate>Tue, 03 Jul 2007 12:19:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030876#M11126</guid>
      <dc:creator>ABS_1</dc:creator>
      <dc:date>2007-07-03T12:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Script /Time function giving different results</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030877#M11127</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;When executing the command you suggested, I get the following error:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;F:\usr\OV\conf\OpC&amp;gt;c:\perl\bin\perl -le 'print join " =L:G= ", scalar localtime,&lt;BR /&gt; scalar gmtime'&lt;BR /&gt;Can't find string terminator "'" anywhere before EOF at -e line 1.&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jul 2007 12:20:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030877#M11127</guid>
      <dc:creator>ABS_1</dc:creator>
      <dc:date>2007-07-03T12:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Script /Time function giving different results</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030878#M11128</link>
      <description>What is the gmtime on both the good and bad servers?&lt;BR /&gt;&lt;BR /&gt;If you posted your reply within 13 minutes of your run, the gmtime is fine but your timezone for local time is for Europe, 1 hour ahead of GMT.  Or 5 hours ahead of EDT.</description>
      <pubDate>Tue, 03 Jul 2007 12:28:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030878#M11128</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-07-03T12:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Script /Time function giving different results</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030879#M11129</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;Here is the gmtime (using the gmtime() function) on the good server:&lt;BR /&gt;&lt;BR /&gt;46 Second&lt;BR /&gt;36 Minute&lt;BR /&gt;17 Hour&lt;BR /&gt;3 Day of Month&lt;BR /&gt;6 Month&lt;BR /&gt;107 Year&lt;BR /&gt;2 Day of week&lt;BR /&gt;183 Day of year&lt;BR /&gt;0 DST&lt;BR /&gt;&lt;BR /&gt;Here is the gmtime (using the gmtime() function) on the bad server:&lt;BR /&gt;&lt;BR /&gt;42 Second&lt;BR /&gt;37 Minute&lt;BR /&gt;17 Hour&lt;BR /&gt;3 Day of Month&lt;BR /&gt;6 Month&lt;BR /&gt;107 Year&lt;BR /&gt;2 Day of week&lt;BR /&gt;183 Day of year&lt;BR /&gt;0 DST&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Both have been posted here within seconds of running the script.</description>
      <pubDate>Tue, 03 Jul 2007 12:37:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030879#M11129</guid>
      <dc:creator>ABS_1</dc:creator>
      <dc:date>2007-07-03T12:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Perl Script /Time function giving different results</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030880#M11130</link>
      <description>&amp;gt;Both have been posted here within seconds of running the script.&lt;BR /&gt;&lt;BR /&gt;Your GMT time on both is fine.  If this was a UNIX system, it would mean your timezone setting was bad on the one.  Since this is Windows, you should have started your thread there.</description>
      <pubDate>Tue, 03 Jul 2007 12:56:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/perl-script-time-function-giving-different-results/m-p/4030880#M11130</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-07-03T12:56:10Z</dc:date>
    </item>
  </channel>
</rss>

