I need to modify a SystemTime
and set it to the current minute without the seconds but I can't find any methods or documentation on how to do this. I am currently using SystemTime::now()
. What I am looking for is some way to set the seconds to zero. Is there a way to do this in rust?
Asked
Active
Viewed 888 times
1

Marcus Ruddick
- 9,795
- 7
- 28
- 43
-
You can't do that without chrono. And even with some trick what you ask don't make sense. SystemTime is not mean to do that. – Stargateur Jun 21 '20 at 02:35
1 Answers
3
SystemTime is not really designed as a full datetime library - it sounds like you probably want something like the chrono or time crates.

Daniel Wagner-Hall
- 2,446
- 1
- 20
- 18