예제 #1
0
def parseXMLTimestamp(xsd_timestamp):

    dt = iso8601.parse(xsd_timestamp)

    if dt.utcoffset() is None:
        # this needs to changed to valueerror...
        raise error.PayloadError('Timestamp has no time zone information')

    # convert to utc and remove tz info (internal use)
    utc_dt = dt.astimezone(UTC()).replace(tzinfo=None)
    return utc_dt
예제 #2
0
def parseXMLTimestamp(xsd_timestamp):

    dt = iso8601.parse(xsd_timestamp)

    if dt.utcoffset() is None:
        # this needs to changed to valueerror...
        raise error.PayloadError('Timestamp has no time zone information')

    # convert to utc and remove tz info (internal use)
    utc_dt = dt.astimezone(UTC()).replace(tzinfo=None)
    return utc_dt
예제 #3
0
def castDatetime(value, cur):
    return iso8601.parse(value)
예제 #4
0
def castDatetime(value, cur):
    return iso8601.parse(value)