chrono 0.4.31 has stricter constraints in time constructor functions, so the cases where a leap second is not allowed are already covered here.
This in turn revealed that dicom-core is not accepting valid times with a leap second from chrono because they are represented differently: whereas our DICOM date time types represent leap seconds as having 60 seconds, like in the encoding of DICOM VRs DT and TM, chrono represents them instead as sub-second fractions larger than 1 second. This requires the seconds and microseconds from these types to be adapted to fit in DicomTime and DicomDateTime.
Resolves the CI error detected in #427.
Summary
update chrono to ^0.4.31
clarify documentation of DicomTime::from_hms_micro
fix TryFrom impls for DicomTime and DicomDateTime so that leap years in chrono types are correctly accounted for
chrono 0.4.31 has stricter constraints in time constructor functions, so the cases where a leap second is not allowed are already covered here.
This in turn revealed that
dicom-core
is not accepting valid times with a leap second from chrono because they are represented differently: whereas our DICOM date time types represent leap seconds as having 60 seconds, like in the encoding of DICOM VRs DT and TM, chrono represents them instead as sub-second fractions larger than 1 second. This requires the seconds and microseconds from these types to be adapted to fit inDicomTime
andDicomDateTime
.Resolves the CI error detected in #427.
Summary
chrono
to^0.4.31
DicomTime::from_hms_micro
TryFrom
impls forDicomTime
andDicomDateTime
so that leap years in chrono types are correctly accounted for