chrono icon indicating copy to clipboard operation
chrono copied to clipboard

⏰ Add `td_*seconds` serde `Serialize` and `Deserialize` functions for `TimeDelta`

Open tosti007 opened this issue 10 months ago • 4 comments

Fixes https://github.com/chronotope/chrono/issues/117

This PR copy-pastes the current implementation for DateTime such that we have equal implementations for DeltaTime.

I opted to add the logic to the existing serde.rs file. However, I think this might be the wrong place and a better solution would be to move the main.rs's serde module combined with this serde.rs file to a separate src/serde.rs file, thoughts?

PS: I am just doing a drive-by PR on this crate, so I don't really know what the exact requirements are regarding testing ect. Please let me know!

tosti007 avatar Jan 16 '25 15:01 tosti007