use chrono::Utc; let dt = Utc::now(); let timestamp: i64 = dt.timestamp(); println!("Current timestamp is {}", timestamp);