serde serializes SystemTime as Duration from std::time::UNIX_EPOCH. Having a CandidType implementation for it that does the same would be useful when sending SystemTime in a message.
I actually tried to implement this myself but failed because I don't understand how to generate named fields in candid. The serde implementation for SystemTime wants a record with secs_since_epoch and nanos_since_epoch fields, for the second and nanosecond parts, respectively. I don't know if that's possible to do in candid.
serde serializes
SystemTimeasDurationfromstd::time::UNIX_EPOCH. Having aCandidTypeimplementation for it that does the same would be useful when sendingSystemTimein a message.I actually tried to implement this myself but failed because I don't understand how to generate named fields in candid. The serde implementation for
SystemTimewants a record withsecs_since_epochandnanos_since_epochfields, for the second and nanosecond parts, respectively. I don't know if that's possible to do in candid.