Add dtt to your Cargo.toml:
dtt
Cargo.toml
[dependencies] dtt = "0.0.1"
use dtt::DateTime; fn main() { // Create new DateTime representing current UTC time let dt = DateTime::new(); println!("ISO 8601: {}", dt.iso_8601); println!("RFC 3339: {}", dt.to_rfc3339()); println!("Unix Timestamp: {}", dt.timestamp); }