use strict; use warnings; # Get Data... my ($tZone, $pMonth, $pDay, $pYear, $pStart) = qw(-04:00 05 30 2012 50460904); print STDERR "tZone=$tZone pMonth=$pMonth pDay=$pDay pYear=$pYear pStart=$pStart\n"; use DateTime; # Start from midnight... my $dt = DateTime->new(year=>$pYear, month=>$pMonth, day=>$pDay, hour=>00, minute=>00, second=>00, time_zone=>$tZone); # Add in milliseconds since midnight (pStart)... $dt->add(seconds=>int($pStart/1000)); my $timestamp = $dt->strftime('%D %T.%3N'); print STDERR "timestamp=$timestamp\n";