转:http://zhidao.baidu.com/question/2052196957516833387.html
http://blog.sina.com.cn/s/blog_979d1c9f0101sk71.html
<?php
function getSeconds($string){ $arr = explode(':', $string); $len = count($arr); return (int)$arr[$len - 1] + (int)$arr[$len - 2] * 60 + (($len > 2 ? (int)$arr[$len - 3] : 0) * 60 * 60); }
?>
<?php echo gmstrftime('%H:%M:%S',800); ?>
显示格式如下:00:03:27