【问题标题】:convert time to Unix Time stamp [closed]将时间转换为 Unix 时间戳 [关闭]
【发布时间】:2014-08-30 10:35:22
【问题描述】:

我需要使用 php 代码将以下日期转换为 Unix 格式。

2014-06-10T11:05:10.723Z 转 Unix?

【问题讨论】:

标签: php datetime time datetime-conversion


【解决方案1】:

之所以有如此多的反对意见,是因为它需要一个内置函数来将日期更改为时间戳,使用单个 Google 搜索来查找。

echo strtotime("2014-06-10T11:05:10.723Z");

输出:

1402398310

【讨论】:

  • 我需要转换为 Unix 时间戳的问题出现错误。
  • 然后只使用我示例中的 strtotime,删除其余部分。 strtotime("2014-06-10T11:05:10.723Z")
  • 别忘了将答案标记为正确。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-18
  • 2013-04-07
  • 1970-01-01
  • 2020-10-19
  • 1970-01-01
  • 1970-01-01
  • 2012-04-17
相关资源
最近更新 更多