Skip to content

Commit

Permalink
Merge pull request #55 from Leulz/master
Browse files Browse the repository at this point in the history
Fix deprecated use of DateTime::from_utc()
  • Loading branch information
fdeantoni authored Sep 30, 2023
2 parents a5b6559 + 44ca687 commit 7e394a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wkt-types/src/pbtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl From<Timestamp> for DateTime<Utc> {
value.normalize();
let dt = NaiveDateTime::from_timestamp_opt(value.seconds, value.nanos as u32)
.expect("invalid or out-of-range datetime");
DateTime::from_utc(dt, Utc)
DateTime::from_naive_utc_and_offset(dt, Utc)
}
}

Expand Down

0 comments on commit 7e394a2

Please sign in to comment.