I tried various approaches but ended up implementing the formatting myself as has already been done for DateTime instances. To prevent any issues with solr i'd like to keep the output stable and avoid changing the string representation of dates too much, especially since this is intended as a bugfix level release. Switching to isoformat or the arrow library would all have significantly changed the iso8601 string.
Implement formatting to support years before 1900 for
date
anddatetime
instances.Python 2.7 can't handle that yet as per https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior.
I tried various approaches but ended up implementing the formatting myself as has already been done for
DateTime
instances. To prevent any issues with solr i'd like to keep the output stable and avoid changing the string representation of dates too much, especially since this is intended as a bugfix level release. Switching toisoformat
or thearrow
library would all have significantly changed the iso8601 string.