time
time copied to clipboard
Microsoft JSON dates
I just come on a error on parsing with time
that it doesn't regonized the type of microsoft's JSON used date.
A example is:
/Date(151708196000)/
The /Date(
and the )/
can be removed, and then there is a known unix timestamp. Would nice if time
could implement it.
In that time, how am I now able to parse this format?
Currently you have to create customer serializer/deserializer functions to do this. By default serializing and deserializing use a single format — it will never try another if the first fails. In the future I hope to have something like #[serde(with = time::serde::format_description!("/Date([timestamp])/")]
which would auto-generate a module.
The [unix_timestamp]
component is now implemented and documented alongside the other components.