1 2 3 4 5 6
use chrono::{DateTime, Local}; pub fn get_time() -> String { let now: DateTime<Local> = Local::now(); now.format("%Y-%m-%d %H:%M:%S").to_string() }