Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How to set a processes notion of the timezone on win32?

by ambrus (Abbot)
on Mar 03, 2010 at 14:06 UTC ( #826410=note: print w/ replies, xml ) Need Help??


in reply to How to set a processes notion of the timezone on win32?

use subs "localtime"; sub localtime { @_ ? gmtime($_[0]) : gmtime() }; + print localtime()."\n";

Prints UTC time instead of localtime. No need to mess with timezones.

(Or convince that module you're using to mock the time to override localtime with a fixed gmtime instead.)


Comment on Re: How to set a processes notion of the timezone on win32?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-07-07 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (85 votes), past polls