Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 lurking in the Monastery: (6)
As of 2014-07-14 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (254 votes), past polls