Does anyone have a clue how to do this? On Linux I can do this:
...and localtime will give me the time in UTC. However win32 (Windows Vista with strawberry Perl 5.10.1 to be precise) steadfastly refuses to give me anything except the local time. Though funnily enough, if I do:
...at the windows command prompt, then print scalar localtime will be in UTC. So there has to be some way to do this in perl but what is it?
(Some background. My module Module::Starter::Plugin::CGIApp creates a bunch of files. One of these has a time stamp created with localtime. In my test suite I compare the modules output against a set of known good files. However as the value of localtime keeps changing, I need to force a fixed time in the test script. I use Test::MockTime for this which almost works except for this time zone issue.)
In reply to How to set a processes notion of the timezone on win32? by jaldhar