From ff36557a6043cf39296e0908db7ec8d567c0245f Mon Sep 17 00:00:00 2001 From: philipp Date: Sat, 4 Mar 2023 13:36:36 +0100 Subject: [PATCH] switch to datetime (instead of string) + show proper timezone --- src/models/trip.rs | 2 +- templates/index.html.tera | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/trip.rs b/src/models/trip.rs index 84ab78f..c04afce 100644 --- a/src/models/trip.rs +++ b/src/models/trip.rs @@ -12,7 +12,7 @@ pub struct Model { pub user_id: i32, pub cox_id: Option, pub begin: Option, - pub created: String, + pub created: chrono::DateTime, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/templates/index.html.tera b/templates/index.html.tera index e4c97ee..ec7f68e 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -25,7 +25,7 @@
    {% for r in rowers %}
  1. - {{ r.user.name }} (angemeldet seit {{ r.trip.created }}) + {{ r.user.name }} (angemeldet seit {{ r.trip.created | date(format="%d.%m. %H:%M", timezone="Europe/Vienna") }}) {% if r.user.name == user.name %}