in reply to Re^4: Convert GMT timestamp to EST/EDT (Time::Local + Time::Piece)
in thread Convert GMT timestamp to EST/EDT
Right, but the code posted anonymously converts to local time instead. That may not be correct.
On second thought, he surely meant for $ENV{TZ} = "US/Eastern"; to remain used, in which case his code works. I didn't quite understand his point (that you can make things more complicated by replacing sprintf with Time::Piece) when I wrote my comment. If you want to use strftime instead of sprintf, you might as well grab it directly from POSIX instead of involving (rather horrible) Time::Piece.
|
|---|