In includes/xmlrpc.inc:379 function xmlrpc_date($time) the function assumes that the format of the date is yyyyMMddThh:mm:ss, while ISO allows a lot more possibilities at least yyyy-MM-ddThh:mm:ss, yyyyMMddThhmmss and yyyy-MM-ddThhmmss. I have mailed http://scripts.incutio.com/xmlrpc/ (the upstream author) already and hope it can be fixed there.

CommentFileSizeAuthor
#2 patch.diff763 bytesduns_s
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Version: 5.5 » 7.x-dev
Component: blogapi.module » other
Category: bug » feature

We do what xmlrpc.com asks though it's not clearly specified but the example there uses our format. A more liberal parser is possible of course.

duns_s’s picture

Version: 7.x-dev » 6.x-dev
Category: feature » bug
FileSize
763 bytes

Patch from chx.

duns_s’s picture

The above patch fixes iso8601 string handling at least for all cases of the form yyyyMMddThhmmss yyyy:MM:ddThh:mm:ss and mixtures of that. So even now the iso8601 standard, as it is fairly complex, is not completely supported, but most of the dates have the above form and it should now be much more compatible. Writing an iso8601 parser is beyond the scope of Drupal and should be supported by PHP natively (imho).

chx’s picture

Status: Active » Reviewed & tested by the community

you meant yyyy-MM-ddThh:mm:ss is supported now, yes. And no, I do not believe PHP should support the full of ISO 8601, nothing supports the full extent of ISO 8601 esp. because without the T marker it can be ambiguous.

duns_s’s picture

Patch works here: http://pseudo-longius.blogsite.org (Drupal 5.5)
Good point about the ambiguous definition, but my main point was that date parsing is nothing special to Drupal and should at least be done in a common way via PHP. Still I don't care how it is getting solved, as long as it is. Thanks for your help! Could you please patch 5.x and 4.7.x as well?

Gábor Hojtsy’s picture

Version: 6.x-dev » 5.x-dev

Committed to 6.x. Marked RTBC for 5.x, as it is unlikely that it does not apply.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 5.x.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.