use chrono::{DateTime, Local, Utc};
use tick::Clock;
const CHRONO_DISPLAY_FORMAT: &str = "%Y-%m-%d %H:%M:%S";
fn main() {
let clock = Clock::new_frozen();
let timestamp = clock.system_time_as::<DateTime<Utc>>();
println!("Current time (UTC): {}", timestamp.format(CHRONO_DISPLAY_FORMAT));
let zoned = timestamp.with_timezone(&chrono_tz::Asia::Tokyo);
println!("Current time (Asia/Tokyo): {}", zoned.format(CHRONO_DISPLAY_FORMAT));
let zoned = timestamp.with_timezone(&Local);
println!("Current time (local): {}", zoned.format(CHRONO_DISPLAY_FORMAT));
}