From 50f2585fbae7f36f4e651ce51f8bcdf0ade97b4b Mon Sep 17 00:00:00 2001
From: Lova ANDRIARIMALALA <43842786+Xpirix@users.noreply.github.com>
Date: Tue, 13 Feb 2024 21:42:15 +0300
Subject: [PATCH] Retun directly utc date for plugins.xml
---
qgis-app/plugins/templates/plugins/plugins.xml | 4 ++--
qgis-app/plugins/templatetags/local_timezone.py | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/qgis-app/plugins/templates/plugins/plugins.xml b/qgis-app/plugins/templates/plugins/plugins.xml
index 198e91b9..cf28e89f 100644
--- a/qgis-app/plugins/templates/plugins/plugins.xml
+++ b/qgis-app/plugins/templates/plugins/plugins.xml
@@ -14,8 +14,8 @@
{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.get_host }}{{ version.get_download_url }}
- {{ version.plugin.created_on|local_timezone }}
- {{ version.created_on|local_timezone }}
+ {{ version.plugin.created_on|local_timezone:"WITH-UTC" }}
+ {{ version.created_on|local_timezone:"WITH-UTC" }}
{% if version.experimental %}True{% else%}False{% endif %}
{{ version.plugin.deprecated }}
diff --git a/qgis-app/plugins/templatetags/local_timezone.py b/qgis-app/plugins/templatetags/local_timezone.py
index 8463a9be..835e7c82 100644
--- a/qgis-app/plugins/templatetags/local_timezone.py
+++ b/qgis-app/plugins/templatetags/local_timezone.py
@@ -13,6 +13,8 @@ def local_timezone(date, args="LONG"):
result = '%s' % (utcdate,)
elif args and str(args) == "SHORT_NATURAL_DAY":
result = '%s' % (utcdate,)
+ elif args and str(args) == "WITH-UTC":
+ result = utcdate
else:
result = '%s' % (utcdate,)
except AttributeError: