开发者

RSS time format to human readable format

开发者 https://www.devze.com 2022-12-21 13:00 出处:网络
I\'m using MagpieRSS to parse some Craigslist feeds. The problem is the publish dates for craigslist posts are in this format: 2010-02-25T18:09:38-06:开发者_如何学C00

I'm using MagpieRSS to parse some Craigslist feeds.

The problem is the publish dates for craigslist posts are in this format: 2010-02-25T18:09:38-06:开发者_如何学C00

How can I convert that to Thursday, February 25, 2010 6:09 PM using php?


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

date()

edit:

date(DATE_RFC822, strtotime($the_date));

is close, but doesn't match your requirements exactly (i.e. it uses abbreviated days / months, 24hour time and includes a timezone string) as specified in RFC822

0

精彩评论

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

关注公众号