The following code uses Date::Manip to parse a time and adjust it from AKST (Alaska Standard) to EST:
use strict;
use warnings;
use Date::Manip;
Date_Init ("TZ=PST"); # May not be needed and timezone irrelevant
my $now = Date_ConvTZ (ParseDate ('00:00:00'), 'AKST', 'EST');
print UnixDate ($now, '%H:%M:%S');
Prints:
04:00:00
DWIM is Perl's answer to Gödel
|