1 2 3 4 5 6 7
use chrono::Local; pub fn current_time() -> String { //! Determines and gets the current time for PC //! Nothing special here lol i just placed a 5 line code into different module Local::now().format("%Y-%m-%d %H:%M:%S").to_string() }