From 709411ce5c5946f40d296a6c1fff8df0515c1dbd Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 5 Sep 2023 16:13:36 +0200 Subject: [PATCH] remove deprecated function --- src/model/log.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/log.rs b/src/model/log.rs index b1314ea..c2b04a3 100644 --- a/src/model/log.rs +++ b/src/model/log.rs @@ -1,4 +1,4 @@ -use chrono::{DateTime, Local, NaiveDateTime, Utc}; +use chrono::{DateTime, Local, NaiveDateTime, TimeZone, Utc}; use serde::{Deserialize, Serialize}; use sqlx::{FromRow, SqlitePool}; @@ -41,7 +41,7 @@ LIMIT 1000 An RSS feed with activities from app.rudernlinz.at"#, ); for log in Self::last(db).await { - let utc_time: DateTime = DateTime::from_utc(log.created_at, Utc); + let utc_time: DateTime = Utc::from_utc_datetime(&Utc, &log.created_at); let local_time = utc_time.with_timezone(&Local); ret.push_str(""); ret.push_str(&format!("({}) {}", local_time, log.msg));