Convert seconds to Hour:Minute:Second(将秒转换为时:分:秒)
问题描述
我需要将秒转换为时:分:秒".
I need to convert seconds to "Hour:Minute:Second".
例如:685"转换为00:11:25"
For example: "685" converted to "00:11:25"
我怎样才能做到这一点?
How can I achieve this?
推荐答案
你可以使用 gmdate()
功能:
You can use the gmdate()
function:
echo gmdate("H:i:s", 685);
这篇关于将秒转换为时:分:秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!