Sat Mar 14 10:14:05 EDT 2015 3/14/2015 10:14:05 -0400 14/Mar/15 10:14:05 14 Mar 15 10:14:05 use Date::Parse; my $local_time = "Sat Mar 14 10:14:05 EDT 2015"; # 1426342445 will be stored in $unix_time my $unix_time = str2time($local_time);
use Date::Parse;
use Date::Language;
my $lang = Date::Language->new('French');
my $unix_time = $lang->str2time("12:14:05, Ago 16, 2014 (CEST)");
# $sec, $min, $hour: 秒,分,时 # $mday: 月中的某天 (0-31) # $mon: 月份,范围 0 (一月) 至 11 (十二月) # $year: 年份,与1900年的差值(2015年为2015-1900=115) # $wday: 星期,范围 0 (星期天) 至 6 (星期六) # $yday: 年中的某天,范围 0 至 364 (或 365 闰年) # $isdst: 是否是夏令时 my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($unix_timestamp); # necessary conversion of $mon and $year $mon += 1; $year += 1900; print "Current time: $year-$mon-$mday $hour:$min:$sec\n";
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有