使用 PHP 将人类到 UNIX 的时间转换


human to UNIX time conversion with PHP

我有这样的字符串:Thu, 27 May 2010 07:00:00 GMT

我想将它们转换为 UNIX 时间戳

有什么办法吗?

echo strtotime('Thu, 27 May 2010 07:00:00 GMT');

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

是的,有办法!事实上,方法不止一种! ;)

你可以使用 strtotime();

$time_en = "Thu, 27 May 2010 07:00:00 GMT"
$time = strtotime($time_en);

http://fr2.php.net/manual/fr/function.strtotime.php