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 Feb 25, 2023
1 parent 04c144b commit 9577a5b
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 @@ -910,7 +910,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 9577a5b

Please sign in to comment.