Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by ambrus (Abbot)
on Mar 03, 2010 at 14:06 UTC ( [id://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.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-26 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found