0

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

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

有什么办法吗?

4

2 回答 2

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

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

于 2012-06-05T17:07:34.203 回答
1

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

您可以使用 strtotime();

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

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

于 2012-06-05T17:08:26.487 回答