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

All,

My "localtime" function has suddenly started to give me the GMT time instead of PST. Any idea how this could happen? My system time is correctly set to PST. Please help.

OS - Windows 2000

I am trying to use this in my regular perl "Build" script.

code snippet
============

#!perl -w
use strict;

my ($hr, $min) = (localtime)2,1;
print "Time is $hr:$min \n";

Replies are listed 'Best First'.
Re: Local Time Problem
by Fletch (Bishop) on Aug 19, 2005 at 17:26 UTC

    Well, in the absence of any code or more pertinent details like the OS involved the first guess would be to check that $ENV{TZ} isn't set to GMT in whatever process is spawning your perl program (either your shell or the webserver if this is a CGI).

    Baring that, I'd look for any small passing singularities and/or eddies in the spacetime continuum. ("It's his couch then, is it?")

    --
    We're looking for people in ATL