Milliseconds to Date and time conversion in Perl using POSIX strftime:
$time = 1329884946288; ## Time in milliseconds
print "\n Time in human readable format = " . POSIX::strftime('%Y-%m-%dT%H:%M:%SZ', localtime($time/1000)) . "\n"; ## divide by 1000 as localtime works with seconds not milliseconds
No comments:
Post a Comment