Skip to main content

format

Function format 

Source
pub fn format<Tz: TimeZone>(date: &DateTime<Tz>) -> String
Expand description

Format a timestamp for export output in the wall-clock time of its zone.

ยงExample:

use chrono::prelude::*;
use imessage_database::util::dates::format;

let date = Utc.with_ymd_and_hms(2020, 5, 20, 9, 10, 11).unwrap();
assert_eq!(format(&date), "May 20, 2020  9:10:11 AM");