Where are Date and Time in Rust?

Why its are so deeply hidden?
Chrono crate shows the time stamp only from


But, how to work witch existing DateTime ?

// entries = std::fs::read_dir(  "/tmp"   )
println!("{:?}\n{:?}\n{:?}", metadata.created().unwrap()  ,   metadata.accessed().unwrap(),metadata.modified().unwrap()   );


SystemTime { intervals: 133022189170001523 }
SystemTime { intervals: 133023079794720901 }
SystemTime { intervals: 129265765620000000 }

How to convert this back ? I need days, years, hours, months , etc.

let modified: DateTime<Local> = metadata.modified()?.into();

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.