flexvault has asked for the wisdom of the Perl Monks concerning the following question:
I need to display the time for a specific time zone on a PC no matter where the PC is physically located in the world. For example if the resource time zone is in California and the PC is in New York, I want to show the time in California on the PC. I tried using 'DateTime':
But this returns the time for the server location.my $dt = DateTime->from_epoch( epoch => time() ); $dt = set_time_zone('America/Los_Angeles'); my $pctime = $dt->epoch();
I can manually calculate it for the US, but would like to have it work for any PC in the world. Any help appreciated.
Note: Just so you understand what I'm doing, I'm sending the time in milliseconds to the PC for display by a 'javascript' routine.
Regards...Ed
"Well done is better than well said." - Benjamin Franklin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Display Specific Time on Any PC.
by kennethk (Abbot) on Mar 24, 2014 at 15:00 UTC | |
by flexvault (Monsignor) on Mar 24, 2014 at 15:21 UTC | |
by kennethk (Abbot) on Mar 24, 2014 at 17:37 UTC | |
by flexvault (Monsignor) on Mar 24, 2014 at 18:00 UTC | |
by kennethk (Abbot) on Mar 24, 2014 at 21:51 UTC | |
|
Re: Display Specific Time on Any PC.
by Your Mother (Archbishop) on Mar 24, 2014 at 22:26 UTC | |
|
Re: Display Specific Time on Any PC.
by ww (Archbishop) on Mar 24, 2014 at 17:48 UTC | |
by flexvault (Monsignor) on Mar 24, 2014 at 17:53 UTC |