比如 1小时40分钟30秒 这样的格式 1:40:30 转成秒
比如 40分钟30秒 这样的格式 40:30 转成秒
<?php
echo(strftime("%b %d %Y %X", mktime(20,0,0,12,31,98))."
");
echo(gmstrftime("%b %d %Y %X", mktime(20,0,0,12,31,98))."
");
//Print the current date, time, and time zone.
echo(gmstrftime("It is %a on %b %d, %Y, %X time zone: %Z",time()));
?>
先正则表达式或者split得到数字格式的时分秒,然后 小时x3600+分钟x60+秒。