RSS时间格式为人类可读格式

时间:2010-02-26 00:44:35

标签: php datetime rss datetime-format magpie

我正在使用MagpieRSS来解析一些Craigslist供稿。

问题是,craigslist帖子的发布日期采用以下格式:2010-02-25T18:09:38-06:00

如何将其转换为Thursday, February 25, 2010 6:09 PM 使用php?

1 个答案:

答案 0 :(得分:2)

date('l, F d, Y h:i A', strtotime($the_date));

date()

编辑:

date(DATE_RFC822, strtotime($the_date));

已关闭,但与RFC822

中指定的完全匹配(即,它使用缩写的天/月,24小时和包含时区字符串)