Date parsing fails when "time/large-dates" feature is enabled #34

Open
opened 2024-09-22 12:52:23 -07:00 by morganava · 1 comment
morganava commented 2024-09-22 12:52:23 -07:00 (Migrated from github.com)

When the "time/large-dates" feature is enabled, the format_description strings used to parse ASN.1 GeneralizedTime and ASN1.UTCTime becomes ambiguous. The parser will greedily consume the month digits for the leading year.

Arguably a deficiency in the upstream time crate, not seemingly allowing anyway to specify how many digits are expected in a year.

When the "time/large-dates" feature is enabled, the [format_description strings](https://time-rs.github.io/book/api/format-description.html) used to parse [ASN.1 GeneralizedTime](https://www.oss.com/asn1/resources/asn1-made-simple/asn1-quick-reference/generalizedtime.html) and [ASN1.UTCTime](https://www.oss.com/asn1/resources/asn1-made-simple/asn1-quick-reference/utctime.html) becomes ambiguous. The parser will greedily consume the month digits for the leading year. Arguably a deficiency in the upstream `time` crate, not seemingly allowing anyway to specify how many digits are expected in a year.
morganava commented 2024-09-24 10:04:55 -07:00 (Migrated from github.com)
Upstream issue: https://github.com/time-rs/time/issues/683
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
acw/simple_asn1#34
No description provided.