哪个时间邮票格式是1651928421543667000

发布于 2025-01-27 07:22:45 字数 132 浏览 3 评论 0 原文

我使用的是API,它返回时间戳为1651928421543667000,我找不到

strtotime()
datetime() 
strftime()

在PHP中使用的支持格式吗?谢谢!

I'm using an API and it returns timestamp as 1651928421543667000, I can't find the supported format I have tried using

strtotime()
datetime() 
strftime()

in PHP any help? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泪是无色的血 2025-02-03 07:22:45

这是纳米秒的时间戳。开发人员需要 ns 精度,用于使用I/O,RAM,无线电信号等的一些低级任务。您可以使用诸如 echo System之类的命令('日期 +%s%n'); 。您还可以通过 ns 转换为 MS s - “ rel =“ nofollow noreferrer”>公制系统的基础知识其中 nano 指示10^-9。

It's a timestamp in nanoseconds. Devs need ns precision for some low-level tasks with I/O, RAM, radio signals and etc. You can get the same value in PHP by using a command such as echo system('date +%s%N');. You can also convert ns into ms or s by using basics of metric system where nano indicates 10^-9.

草莓味的萝莉 2025-02-03 07:22:45

因此,输出是Unix-Timestamp格式。如果要将其转换为常规DateTime格式,请使用以下代码。但是,如@mardubbles所指出的那样,您必须将其首先转换为秒。

$time = time();    
date("d F Y H:i:s", $time);

So the output is a UNIX-Timestamp format. If you want to convert it to a regular datetime format, use the following code. However, you have to convert it to seconds first by dividing the time by 10^9 as @mardubbles pointed out.

$time = time();    
date("d F Y H:i:s", $time);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文