= Utc::now(); // e.g. `2014-11-28T12:45:59.324310806Z` let local: DateTime<Local> = Local::now(); // e.g. `2014-11-28T21:45:59.324310806+09:00` use chrono::prelude::*; use chrono::offset::LocalResult; let dt = Utc.ymd(2014, 7, 8).and_hms(9, 10, 11); // `2014-07-08T09:10:11Z` // July 8 is 188th day of the year 2014 (`o` for "ordinal") assert_eq!(dt, Utc.yo(2014, 189).and_hms(9, 10, 11)); // July 8 is Tuesday in ISO week 28 of the year 2014. assert_eq!(dt, Utc.isoywd(2014, 28, Weekday::Tue).and_hms(9, 10, 11)); 18