Perl-Sensitive Sunglasses | |
PerlMonks |
Finding a remote timeby Moron (Curate) |
on Jul 17, 2006 at 09:28 UTC ( [id://561717]=perlquestion: print w/replies, xml ) | Need Help?? |
Moron has asked for the wisdom of the Perl Monks concerning the following question:
Looking through several pages of modules produced by looking up cpan://Time, I am still no better off with this issue: localtime() gives me the time in the CET zone. But I am in a routine that is being given records containing a date and time field originally created in EST. Owing to DST inconstency it is not acceptable to apply the most usual difference of 5 hours, because the routine has to work all year round and that idea fails a couple of weeks of the year or so. So I need to get the current time in EST and find the difference which I can then apply to these records so that I am storing them in CET, wherever they came from in the world (that is when I eventually make the solution generic after resolving this immediate case). Is there a way I can fool localtime() into giving me the EST time or any other idea for how to get the current EST time from a CET-based machine? Thanks in advance for suggestions. -M Free your mind
Back to
Seekers of Perl Wisdom
|
|