]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commit
CA-38687: be more accepting of ISO8601 dates without a timezone.
authorDavid Scott <dave.scott@eu.citrix.com>
Tue, 30 Mar 2010 10:30:33 +0000 (11:30 +0100)
committerDavid Scott <dave.scott@eu.citrix.com>
Tue, 30 Mar 2010 10:30:33 +0000 (11:30 +0100)
commit0af90d5d961bf361a78775294602ec0f902fc1c4
treecef310c205c354cb85287dfab2decf9f60c5755f
parent9501b532080fc7c5d1637f9fde26e816378ea0bf
CA-38687: be more accepting of ISO8601 dates without a timezone.

Note that xapi expects all dates to be in UTC; xapi knows nothing about timezones.

The XMLRPC spec is vague but encourages people to *omit* the timezone information from requests. We now accept such vague inputs but we still expect them to be in UTC.

The following python snippet produces no results without the fix and the full message list (as expected) with the fix:

<<<<<
#!/usr/bin/env python

import xmlrpclib

x = xmlrpclib.Server("http://localhost")
session = x.session.login_with_password("root", "password")["Value"]
print repr(x.message.get_since(session, xmlrpclib.DateTime(0)))
>>>>>

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
stdext/date.ml