perl获取日起和时间
摘要:
注意:localtime获取的年份是相对于1900的偏移,需要加上1900,而localtime获取的month范围是0-11,需要加1。my ($sec,$min,$hour,$day,$mon,$year,$wday,$yday,$isdst) = localtime(); $year += 1900; $mon++;my $date = "$year-$mon-$day"; print $date, "\n";== 阅读全文
posted @ 2011-12-26 15:47 perlman 阅读(1160) 评论(0) 推荐(0) 编辑