【问题标题】:How to create PHP hex timestamp如何创建 PHP 十六进制时间戳
【发布时间】:2015-12-01 17:18:40
【问题描述】:

我必须将 php 中的时间戳转换为 php 中的十六进制时间戳。问题是,我找不到方法。猜猜这将是一些简单的功能。谁能帮帮我?

【问题讨论】:

    标签: php timestamp hex


    【解决方案1】:

    您可以通过 time() 调用当前时间戳然后使用 dexhex 函数将其转换为十六进制来创建一个十六进制纪元时间戳:

    $hextime = dechex(time());
    

    http://php.net/manual/en/function.time.php

    http://php.net/manual/en/function.dechex.php

    【讨论】:

      猜你喜欢
      • 2018-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-21
      • 1970-01-01
      • 1970-01-01
      • 2021-10-15
      • 2015-03-12
      相关资源
      最近更新 更多