Fixes a issue where pythonCollectionFromPropertyList crashes on dates prior to year 1970.
Both NSDate and python's datetime classes are capable of handling dates prior to 1970/01/01. However, the datetime.fromtimestamp API does not. It would throw the following exception:
File "/opt/homebrew/lib/python3.11/site-packages/PyObjCTools/Conversion.py", line 220, in pythonCollectionFromPropertyList
return datetime.datetime.fromtimestamp(aCollection.timeIntervalSince1970())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: year 0 is out of range
Fixes a issue where
pythonCollectionFromPropertyList
crashes on dates prior to year 1970.Both
NSDate
and python'sdatetime
classes are capable of handling dates prior to 1970/01/01. However, thedatetime.fromtimestamp
API does not. It would throw the following exception: