woei has asked for the wisdom of the Perl Monks concerning the following question:
I have tried really hard searching for a solution to this problem in many places but have yet to find a satisfactory answer, so I hope someone here can enlighten me.
Currently I have a script that is running on a remote machine (in the States, the localtime of which is the EST), I'd like certain functions to actually execute between a range of times where I am (in South Australian, our timezone is ACST).
I've considered converting the localtime of the host machine to the GMT, then converting that to our timezone (+9.5 hours) but that does not take into account issues like DST which can skew things quite a little.
It'd be great if I can get the Perl script to "sort of" run using our local timezone through some environmental variable, but even then it is still subpar if it is something that is to be employed in a persistent process. Surely there is some method or module that takes in a time specified in EST, and *poof* converts it to ACST?
Is there a more elegant way of doing it?
Another issue that I noticed is on a Solaris box here, typing the 'date' command on the command line actually yields a "CST" timezone, which can be quite ambiguous with the American "CST", is there some way to differentiate the two to perl?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Timezone conversion in Perl
by ww (Archbishop) on Dec 27, 2007 at 06:17 UTC | |
by rlucas (Scribe) on Dec 27, 2007 at 06:30 UTC | |
by dsheroh (Monsignor) on Dec 27, 2007 at 17:10 UTC | |
by autarch (Hermit) on Dec 28, 2007 at 04:48 UTC | |
Re: Timezone conversion in Perl
by polettix (Vicar) on Dec 27, 2007 at 09:50 UTC | |
Re: Timezone conversion in Perl
by jasonk (Parson) on Dec 28, 2007 at 19:06 UTC |