Skip to content

Commit

Permalink
tweak example in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
klnusbaum committed Jan 31, 2023
1 parent 5632886 commit ef3f804
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>()?.and_time(NaiveTime::default()).and_utc_timezone();
/// let dt = "2023-01-30".parse::<NaiveDate>().unwrap().and_time(NaiveTime::default()).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 ef3f804

Please sign in to comment.