if values['microsecond'] is None:
    values['microsecond'] = 0
else:
    values['microsecond'] = values['microsecond'][1:]
values['microsecond'] += '0' * (6 - len(values['microsecond']))
values = dict((k, int(v)) for k, v in values.items() if not k.
    startswith('tz'))
try:
    return datetime.datetime(**values), tz
except ValueError:
    pass
return None, None
Как разобрать формат xsd:dateTime?