Home  >  Article  >  Backend Development  >  unix-时间戳 - 1.4357550505488E+16 这种Epoch时间戳格式PHP如何转换为10位时间戳

unix-时间戳 - 1.4357550505488E+16 这种Epoch时间戳格式PHP如何转换为10位时间戳

WBOY
WBOYOriginal
2016-06-06 20:32:191338browse

七牛云获取到的文件puttime时间。

如何转换为时间戳,
不要说截取前10位了、我想知道有没有系统函数可以直接转换
按照七牛客服的说法

<code>1.4357550505488E+16 去掉 7 位数 为秒。

date -r 1435755050 
Wed Jul 1 20:50:50 CST 2015
</code>

unix时间戳是一个公开算法,不属于七牛的业务,您可以自行在百度或谷歌中查阅相关资料。

unix-时间戳 - 1.4357550505488E+16 这种Epoch时间戳格式PHP如何转换为10位时间戳

回复内容:

七牛云获取到的文件puttime时间。

如何转换为时间戳,
不要说截取前10位了、我想知道有没有系统函数可以直接转换
按照七牛客服的说法

<code>1.4357550505488E+16 去掉 7 位数 为秒。

date -r 1435755050 
Wed Jul 1 20:50:50 CST 2015
</code>

unix时间戳是一个公开算法,不属于七牛的业务,您可以自行在百度或谷歌中查阅相关资料。

unix-时间戳 - 1.4357550505488E+16 这种Epoch时间戳格式PHP如何转换为10位时间戳

一个17位数字截取前10位还需要系统函数么 。。。除以10000000取整不就行了?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn