Function stringutils::timestamp_to_string[][src]

pub fn timestamp_to_string(timestamp_secs: i64) -> Result<String, Utf8Error>
Expand description

Get a String representation for a timestamp.

Example

let current_time = unsafe { libc::time(std::ptr::null_mut()) };
let repr = stringutils::timestamp_to_string(current_time).unwrap();
println!("Current time: {}", repr);