如何将时间戳以毫秒为单位转换为时间?

bdf*_*dfy 0 perl

如何将时间戳(以毫秒为单位)转换为"13:52:11.12"之类的时间格式?

a'r*_*a'r 5

use DateTime;
my $t = time() * 1000 + 400;

print DateTime->from_epoch(epoch => $t/1000)->format_cldr('H:m:s.S');
# 13:22:47.4
Run Code Online (Sandbox Code Playgroud)