Skip to content
Snippets Groups Projects
Unverified Commit f72c352d authored by Guy Halse's avatar Guy Halse Committed by GitHub
Browse files

Fix logic leading to negative expiry (#1402)

parent 4a928334
No related branches found
No related tags found
No related merge requests found
......@@ -48,9 +48,9 @@
{% endif -%}</a>
{%- if entity.expire is defined %}
{% if entity.expire > date().timestamp %}
<span class="entity-expired"> (expired {{ ((date().timestamp - entity.expire) / 3600) }} hours ago)</span>
{% else %} (expires in {{ ((entity.expire - date().timestamp) / 3600) }} hours){% endif -%}{% endif %}
{% if ((entity.expire - date().timestamp) < 0) %}
<span class="entity-expired"> (expired {{ ((date().timestamp - entity.expire) / 3600) | round(2) }} hours ago)</span>
{% else %} (expires in {{ ((entity.expire - date().timestamp) / 3600) | round(2) }} hours){% endif -%}{% endif %}
</li>
{% endfor %}
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment