

def decodeValue(self, value):
    'Return a `datetime.datetime` instance.'
    assert (len(value) == self.length)
    (_jdn, _msecs) = struct.unpack('<2I', value)
    if (_jdn >= 1):
        _rv = datetime.datetime.fromordinal((_jdn - self.JDN_GDN_DIFF))
        _rv += datetime.timedelta(0, (_msecs / 1000.0))
    else:
        _rv = None
    return _rv

dataset/ETHPy150Open kennethreitz/tablib/tablib/packages/dbfpy3/fields.py DbfDateTimeFieldDef.decodeValue/original