[DateTime]: Parsing RSS publishing dates
Hi, when parsing RSS, there are many date formats. For example: Fri, 19 Sep 2008 16:49:00 EDT Sat, 20 Sep 2008 11:25:00 +0100 I would like to write a single function which takes care of parsing this stuff and returns a GMT time. The attached code can take care of the format with the exception of the time zone. From what I read in the documentation and various other sources I take it that time zones like EDT cannot be automatically handled by BoostTime. But I would assume that it is not a big deal to take care of something like +0100? Sadly, I have no idea how to do that? Thanks and regards, Roland
On Sat, Sep 20, 2008 at 12:58:25PM +0200, Roland Bock wrote:
Hi,
when parsing RSS, there are many date formats. For example:
RSS 2.0 refers to RFC822 for the date-time format: http://asg.web.cmu.edu/rfc/rfc822.html#sec-5 The full grammar specification is there, so you might try writing a parser in Spirit..
Hi Zeljko, yes, I could do that. And I have even seen such a parser already: http://spirit.sourceforge.net/repository/applications/show_contents.php To be honest, I had hoped that there would be a nice way to do this directly in Boost.DateTime. Regards, Roland Zeljko Vrba wrote:
On Sat, Sep 20, 2008 at 12:58:25PM +0200, Roland Bock wrote:
Hi,
when parsing RSS, there are many date formats. For example:
RSS 2.0 refers to RFC822 for the date-time format: http://asg.web.cmu.edu/rfc/rfc822.html#sec-5
The full grammar specification is there, so you might try writing a parser in Spirit..
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Roland Bock
-
Zeljko Vrba