TA贡献1775条经验 获得超11个赞
1
2
3
4
5
6
7
8
9
use Date::Calc qw(Date_to_Time);
my $t1 = Date_to_Time(1970, 1, 1, 0, 0, 0); #1970-1-1 0:0:0
print "$t1\n"; # 结果为0
my $t2 = Date_to_Time(2014,4,9,0,0,0); #2014-4-9 0:0:0
print "$t2\n";
my $t = $t2 * 1000; # 秒数*1000=毫秒数
print "$t\n";
举报