我必须将php中的时间戳设置为php中的十六进制时间戳。问题是,我找不到怎么做的方法。我想这将是一个简单的函数。有人能帮我吗?
您可以创建一个十六进制epoch时间戳,方法是用time()调用当前时间戳,然后使用dexhex函数将其转换为十六进制:
$hextime = dechex(time());
http://php.net/manual/en/function.time.php
http://php.net/manual/en/function.dechex.php
我必须将php中的时间戳设置为php中的十六进制时间戳。问题是,我找不到怎么做的方法。我想这将是一个简单的函数。有人能帮我吗?
您可以创建一个十六进制epoch时间戳,方法是用time()调用当前时间戳,然后使用dexhex函数将其转换为十六进制:
$hextime = dechex(time());
http://php.net/manual/en/function.time.php
http://php.net/manual/en/function.dechex.php