Skip to content

Commit

Permalink
Retun directly utc date for plugins.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpirix committed Feb 13, 2024
1 parent e4d984b commit 50f2585
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qgis-app/plugins/templates/plugins/plugins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<author_name><![CDATA[{% firstof version.plugin.author version.plugin.created_by %}]]></author_name>
<download_url>{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.get_host }}{{ version.get_download_url }}</download_url>
<uploaded_by><![CDATA[{{ version.created_by }}]]></uploaded_by>
<create_date>{{ version.plugin.created_on|local_timezone }}</create_date>
<update_date>{{ version.created_on|local_timezone }}</update_date>
<create_date>{{ version.plugin.created_on|local_timezone:"WITH-UTC" }}</create_date>
<update_date>{{ version.created_on|local_timezone:"WITH-UTC" }}</update_date>
<experimental>{% if version.experimental %}True{% else%}False{% endif %}</experimental>
<deprecated>{{ version.plugin.deprecated }}</deprecated>
<tracker><![CDATA[{{ version.plugin.tracker }}]]></tracker>
Expand Down
2 changes: 2 additions & 0 deletions qgis-app/plugins/templatetags/local_timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def local_timezone(date, args="LONG"):
result = '<span class="user-timezone-short">%s</span>' % (utcdate,)
elif args and str(args) == "SHORT_NATURAL_DAY":
result = '<span class="user-timezone-short-naturalday">%s</span>' % (utcdate,)
elif args and str(args) == "WITH-UTC":
result = utcdate
else:
result = '<span class="user-timezone">%s</span>' % (utcdate,)
except AttributeError:
Expand Down

0 comments on commit 50f2585

Please sign in to comment.