sfo/
sfo.rs

1use airports::Airports;
2use chrono::{DateTime, TimeZone, Utc};
3use chrono_tz::Tz;
4
5fn main() {
6    let db = Airports::new();
7    println!("SFO timezone: {:?}", db.get_tz_name("sfo").unwrap());
8
9    match db.get_tz("SFO") {
10        Some(t) => {
11            let x: DateTime<Tz> = Utc::now().with_timezone(&t);
12            println!("Current time in SFO: {}", x);
13        }
14        None => println!("Not found!"),
15    }
16}