From 307a888a0bd48787a4111732a22ea491e5b3905b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 17 Sep 2022 16:31:12 +0200 Subject: [PATCH] DateTime::from_utc isn't being merged in parsers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- src/room.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/room.rs b/src/room.rs index 9b673cb..84a7a46 100644 --- a/src/room.rs +++ b/src/room.rs @@ -19,7 +19,7 @@ use crate::error::Error; use std::collections::HashMap; use std::iter::IntoIterator; -use chrono; +use chrono::{FixedOffset, Utc}; use log::debug; use xmpp_parsers::{ date::DateTime, @@ -129,7 +129,7 @@ impl Room { if self.subject.is_none() { let subject = String::from(""); let setter = new_occupant; - let stamp = DateTime::from_utc(chrono::Utc::now()); + let stamp = DateTime(Utc::now().with_timezone(&FixedOffset::east(0))); self.subject = Some((subject, setter, stamp)); }