Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | patch.diff | 763 bytes | duns_s |
Comments
Comment #1
chx CreditAttribution: chx commentedWe 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.
Comment #2
duns_s CreditAttribution: duns_s commentedPatch from chx.
Comment #3
duns_s CreditAttribution: duns_s commentedThe 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).
Comment #4
chx CreditAttribution: chx commentedyou 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.Comment #5
duns_s CreditAttribution: duns_s commentedPatch 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?
Comment #6
Gábor HojtsyCommitted to 6.x. Marked RTBC for 5.x, as it is unlikely that it does not apply.
Comment #7
drummCommitted to 5.x.
Comment #8
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.