sfackler / rust-postgres

Native PostgreSQL driver for the Rust programming language
Apache License 2.0
3.42k stars 436 forks source link

replace deprecated chrono::DateTime::from_utc #1077

Closed ds-cbo closed 10 months ago

ds-cbo commented 10 months ago

Fixes the test run failing in https://github.com/sfackler/rust-postgres/actions/runs/6589121392/job/17903210060?pr=1074 for pull request https://github.com/sfackler/rust-postgres/pull/1074

error: use of deprecated associated function `chrono::DateTime::<Tz>::from_utc`: Use TimeZone::from_utc_datetime() or DateTime::from_naive_utc_and_offset instead
  --> postgres-types/src/chrono_04.rs:43:22
   |
43 |         Ok(DateTime::from_utc(naive, Utc))
   |                      ^^^^^^^^
   |
   = note: `-D deprecated` implied by `-D warnings`

error: could not compile `postgres-types` (lib) due to previous error
ds-cbo commented 10 months ago

I'm sorry for the failed CI runs, but I still can't seem to make the Docker work locally to run the tests. Let's hope third time's the charm