PHP如何生成过期GMT时间 Mon,12 May 2001 00:20:00 GMT


PHP如何生成GMT时间,类似这样的日期(欧美人最常用的):


 Mon,12 May 2001 00:20:00 GMT

日期 php

孟婆阿珊。 9 years, 7 months ago

 $time = new DateTime("2001-05-12 00:20:00", new DateTimeZone("GMT"));
echo $time->format("D, d M Y H:i:s T");

http://3v4l.org/07jJ8 其实我一直在好奇题主设置的时区的,因为2010年5月12日中国时间是星期六诶...

荡漾转转神 answered 9 years, 7 months ago


 <?php
gmdate('D, d M Y H:i:s T');

方寸却不能定夺 answered 9 years, 7 months ago

Your Answer