openpgp-card: lint fix (replace deprecated chrono call)

This commit is contained in:
Heiko Schaefer 2023-08-29 16:11:08 +02:00
parent 9761e0e664
commit 11ce179c00
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -16,7 +16,7 @@ impl From<KeyGenerationTime> for DateTime<Utc> {
let naive_datetime = NaiveDateTime::from_timestamp_opt(kg.0 as i64, 0) let naive_datetime = NaiveDateTime::from_timestamp_opt(kg.0 as i64, 0)
.expect("invalid or out-of-range datetime"); .expect("invalid or out-of-range datetime");
DateTime::from_utc(naive_datetime, Utc) DateTime::from_naive_utc_and_offset(naive_datetime, Utc)
} }
} }