{% if format =="hms"%}
{% if h*60*60+m*60+s >= 86400 %}

23

{% else %} {% if h < 10 %}

0{{h}}

{% else %}

{{h}}

{% endif %} {% endif %}

:

{% if h*60*60+m*60+s >= 86400 %}

59

{% else %} {% if m < 10 %}

0{{m}}

{% else %}

{{m}}

{% endif %} {% endif %}

:

{% if h*60*60+m*60+s >= 86400 %}

59

{% else %} {% if s < 10 %}

0{{s}}

{% else %}

{{s}}

{% endif %} {% endif %}
{% elseif format == "ms"%}
{% if h*60*60+m*60+s >= 3600%}

59

{% else %} {% if m < 10 %}

0{{m}}

{% else %}

{{m}}

{% endif %} {% endif %}

:

{% if h*60*60+m*60+s >= 3600 %}

59

{% else %} {% if s < 10 %}

0{{s}}

{% else %}

{{s}}

{% endif %} {% endif %}
{%elseif format == "s"%}

{{h*60*60+m*60+s}}

{%endif%}