Perl时间处理

time();返回當前UNIX時間

localtime();   把UNIX時間變換為一般格式的時間
用法:($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime($unix_time);
$sec:秒
$min:分
$hour:時
$mday:日
$mon:月(0..11)
$year:年數(自1900年)
$wday:星期(0..6)
$yday:年內天數
$indst:是否是在daylight saving time.
$unix_time:一個unix時間,如留空則取當前時間.

timelocal();把本地時間變換為UNIX時間
用法:$unix_time=timelocal($sec,$min,$hour,$mday,$mon,$year);
$sec:秒 $min:分 $hour:時
$mday:日(1..31) $mon:月(0..11) $year:年數(如使用三位的年份為自1900年始)