From 63b76754c1ff5893f13431e45960d8e555ffabec Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Mon, 15 Jul 2024 18:49:59 +0200 Subject: [PATCH] fixed summer/winter time conversion error Resolves https://github.com/TUM-Dev/NavigaTUM/issues/1306 --- server/main-api/src/calendar/models.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/main-api/src/calendar/models.rs b/server/main-api/src/calendar/models.rs index f4c32f719..622e6db8e 100644 --- a/server/main-api/src/calendar/models.rs +++ b/server/main-api/src/calendar/models.rs @@ -1,7 +1,6 @@ -use std::fmt::Display; - -use chrono::{DateTime, Utc}; +use chrono::{DateTime, Duration, Utc}; use serde::{Deserialize, Serialize}; +use std::fmt::Display; use crate::models::Location; @@ -75,8 +74,8 @@ impl Event { detailed_entry_type = EXCLUDED.detailed_entry_type"#, self.id, self.room_code, - self.start_at, - self.end_at, + self.start_at + Duration::hours(1), + self.end_at + Duration::hours(1), self.stp_title_de, self.stp_title_en, self.stp_type,