Skip to content

Commit

Permalink
go back to simpler documentation example
Browse files Browse the repository at this point in the history
  • Loading branch information
klnusbaum committed Jan 31, 2023
1 parent ef3f804 commit 0fa643f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/naive/datetime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ impl NaiveDateTime {
///
/// ```
/// use chrono::{NaiveDate, NaiveTime, Utc};
/// let dt = "2023-01-30".parse::<NaiveDate>().unwrap().and_time(NaiveTime::default()).and_utc_timezone();
/// let dt = NaiveDate::from_ymd_opt(2023, 1, 30).unwrap().and_hms_opt(19, 32, 33).unwrap().and_utc_timezone();
/// assert_eq!(dt.timezone(), Utc);
pub fn and_utc_timezone(&self) -> DateTime<Utc> {
Utc.from_utc_datetime(self)
Expand Down

0 comments on commit 0fa643f

Please sign in to comment.