chrono::MAX_DATETIME
is not deserializable via parse_from_rfc3339
#641
Labels
chrono::MAX_DATETIME
is not deserializable via parse_from_rfc3339
#641
Steps to Reproduce
Run the following code (playground)
Context
Our code creates a timestamp with the maximum value to represent a record that never expires and it fails at deserialization. We are going to use regular
from_str
to workaround the problem, but still I'd expectDateTime::parse_from_rfc3339(dt.to_rfc3339()))
to be purely an identity conversion. Is it a bug or is it intended?Offtopic Context
I am using
RFC3339
representation to store the timestamp in a DynamoDB database string property to have it lexicographically sortable. As I see all values after9999
year have a plus sign and a variable amount of digits in the year. Unfortunately, it messes up the monotonic nature of this format =(. I guess we will have to just accept that we can't have timestamps properly sorted for years more than 9999 just because we will never have such values during our lifespan. Do you have any suggestions for a better solution for this particular problem?The text was updated successfully, but these errors were encountered: