Timezone now CET

This commit is contained in:
2026-05-01 18:11:40 +02:00
parent 4fc1c2eeb8
commit 92fdb87cf0
5 changed files with 44 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
use chrono_tz::Europe::Berlin;
use gloo_net::http::Request;
use serde::{Deserialize, Serialize};
use wasm_bindgen::JsCast;
@@ -26,7 +27,7 @@ pub struct Ticket {
pub description: String,
pub room: i16,
pub status: String,
pub date: chrono::NaiveDateTime,
pub date: chrono::DateTime<chrono::Utc>,
pub user_id: i16,
pub user_first_name: String,
pub user_last_name: String,
@@ -310,7 +311,9 @@ pub fn ticket_by_id_component(props: &TicketProps) -> Html {
<p><strong>{ "Betreff: " }</strong>{ &t.betreff }</p>
<p><strong>{ "Beschreibung: " }</strong>{ &t.description }</p>
<p><strong>{ "Raum: " }</strong>{ t.room }</p>
<p><strong>{ "Datum: " }</strong>{ &t.date }</p>
<p><strong>{ "Datum: " }</strong>{
t.date.with_timezone(&Berlin).format("%d.%m.%Y %H:%M:%S").to_string()
}</p>
<p><strong>{ "Status: "}</strong>{ match t.status.as_str() {
"ToDo" => "Zu tun",
"InProgress" => "In Bearbeitung",