Closed wgoodall01 closed 4 years ago
This behavior is technically out of spec, as RFC3339 is defined for all years "somewhere between 0000AD and 9999AD"
It looks like Apple deviates a bit from RFC3339. It allows negative years but not subsecond precision.
https://github.com/opensource-apple/CF/blob/master/CFPropertyList.c#L1676
Merged in 7b0e6d42840ca223597b82b1f44ecfe6db237659.
When using
rust-plist
to parse an iTunes library file, I ran into parsing errors with particularly old<date>
values. As it turns out, thehumantime
crate returns anOutOfRange
error while parsing any date before 1970. This behavior is technically out of spec, as RFC3339 is defined for all years "somewhere between 0000AD and 9999AD"This patch entirely replaces the
humantime
crate withchrono
, and adds a test case with a date before 1970 to prevent regressions.