]> 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)
commite43c41b9c3e0003f494f9fb95f569438db6b5423
tree4def2638a0b2031818a503aa52a96a86470ef2b4
parent9bbc24263e3ab8b16bb790f7730d6ec362e77159
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