Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Comments

  1. There are a few 3rd-party Rust crates time, quanta and chrono for handling time/date. The Rust crate time, is recommended. For detailed discussions, please refer to No Time for Chrono .

SystemTime { tv_sec: 1638324570, tv_nsec: 811168245 }
1638324597.690945736s
1638324623.948540298s
1638324793
1638324649987
1638325403263831531

Format SystemTime (as String)

SystemTime itself does not support formatting as string. However, it can be done indirectly by casting SystemTime to chrono::Datetime first.

2021-11-30 18:15:06.485079503
2021-11-30T18:15:12.199268942-08:00

The Rust Crate time