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

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

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

七牛云获取到的文件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取整不就行了?

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn