This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Connor.Wolf, belopolsky, ned.deily, ronaldoussoren, serhiy.storchaka
Date 2014-12-04.08:43:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417682620.45.0.127707715277.issue22993@psf.upfronthosting.co.za>
In-reply-to
Content
Another limitation is that on 32-bit platform it is impossible to load date before datetime.datetime(1901, 12, 13, 20, 45, 52) from binary plist.

>>> plistlib.loads(b'bplist003'+struct.pack('>d', -2**31 - (31 * 365 + 8) * 86400)+b'\x08\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11')
datetime.datetime(1901, 12, 13, 20, 45, 52)
>>> plistlib.loads(b'bplist003'+struct.pack('>d', -2**31 - (31 * 365 + 8) * 86400 - 1)+b'\x08\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 1006, in loads
    fp, fmt=fmt, use_builtin_types=use_builtin_types, dict_type=dict_type)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 997, in load
    return p.parse(fp)
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 623, in parse
    return self._read_object(self._object_offsets[top_object])
  File "/home/serhiy/py/cpython/Lib/plistlib.py", line 688, in _read_object
    return datetime.datetime.utcfromtimestamp(f + (31 * 365 + 8) * 86400)
OverflowError: timestamp out of range for platform time_t

Can second example be loaded by Apple tools on 32-bit?
History
Date User Action Args
2014-12-04 08:43:40serhiy.storchakasetrecipients: + serhiy.storchaka, ronaldoussoren, belopolsky, ned.deily, Connor.Wolf
2014-12-04 08:43:40serhiy.storchakasetmessageid: <1417682620.45.0.127707715277.issue22993@psf.upfronthosting.co.za>
2014-12-04 08:43:40serhiy.storchakalinkissue22993 messages
2014-12-04 08:43:40serhiy.storchakacreate