Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^3: How to convert time from one time zone to another

by ww (Archbishop)
on Apr 02, 2012 at 15:12 UTC ( #963037=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use 5.014;
    # convert TZ 
        local $ENV{TZ} = "IST-05:30";                  # does not return c
    +orrect time on W7
        say "In Mumbai, it is " . localtime();         # but, rather, same
    + as NY localtime
  2. or download this
    $ENV{TZ}: EST5EDT                            # TZ is set but this does
                                                 # not appear to be defaul
    +t (for Win7)
    In New York, it is Mon Apr  2 10:41:23 2012  # correct
    In Mumbai, it is Mon Apr  2 10:41:23 2012    #obviously wrong

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://963037]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2022-10-03 15:14 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (14 votes). Check out past polls.