开发者

PEAR Date date_create_from_format

开发者 https://www.devze.com 2023-02-07 22:00 出处:网络
开发者_JAVA百科Which PHP function do I useto parse a date that is in the format \"Fri, 28 Jan 2011 17:57:37 GMT\"
开发者_JAVA百科

Which PHP function do I use to parse a date that is in the format "Fri, 28 Jan 2011 17:57:37 GMT"

strtotime doesn't seem to work for me on that date.

Thanks.


$date = date_create_from_format('D, j M Y H:i:s O', 'Fri, 28 Jan 2011 17:57:37 GMT')

Full docs on the format characters here.

Beats me why couldn't look this up yourself - you've got the function name in your post's title.

0

精彩评论

暂无评论...
验证码 换一张
取 消