From 5ed356843622f29762b909762eb3400be50c1cec Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Sun, 4 Aug 2024 09:06:35 +0300 Subject: [PATCH] Format date --- templates/new_post.html.j2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/new_post.html.j2 b/templates/new_post.html.j2 index 2773c95..89dd978 100644 --- a/templates/new_post.html.j2 +++ b/templates/new_post.html.j2 @@ -42,8 +42,8 @@
- {% set created_date = time.strptime(data['created_at'], '%Y-%m-%dT%H:%M:%S') %} - {{ created_date.strftime('%Y-%m-%d %H:%M %z') }} + {% set created_date = time.strptime(data['created_at'], '%Y-%m-%dT%H:%M:%S.%fZ') %} + {{ time.strftime('%Y-%m-%d %H:%M:%S %zUTC', created_date) }}
@@ -87,8 +87,8 @@
- {% set created_date = time.strptime(data['reply']['created_at'], '%Y-%m-%dT%H:%M:%S') %} - {{ created_date.strftime('%Y-%m-%d %H:%M %z') }} + {% set created_date = time.strptime(data['reply']['created_at'], '%Y-%m-%dT%H:%M:%S.%fZ') %} + {{ time.strftime('%Y-%m-%d %H:%M:%S %zUTC', created_date) }}
@@ -134,8 +134,8 @@
- {% set created_date = time.strptime(data['reblog']['created_at'], '%Y-%m-%dT%H:%M:%S') %} - {{ created_date.strftime('%Y-%m-%d %H:%M %z') }} + {% set created_date = time.strptime(data['reblog']['created_at'], '%Y-%m-%dT%H:%M:%S.%fZ') %} + {{ time.strftime('%Y-%m-%d %H:%M:%S %zUTC', created_date) }}