Fixed time displayed issue

This commit is contained in:
2025-08-10 11:27:35 -04:00
parent 0e517b110f
commit c1a2338c56
7 changed files with 63 additions and 936 deletions
+19 -1
View File
@@ -188,7 +188,25 @@
</td>
<td>
<div class="time-info">
{{ record.check_in_time.strftime('%H:%M') }}
{% if record.check_in_time %}
{% set check_in_time = record.check_in_time %}
{% if check_in_time is string %}
{{ check_in_time }}
{% else %}
{% if check_in_time.strftime is defined %}
{{ check_in_time.strftime('%H:%M') }}
{% elif check_in_time.total_seconds is defined %}
{% set total_seconds = check_in_time.total_seconds() | int %}
{% set hours = (total_seconds // 3600) % 24 %}
{% set minutes = (total_seconds % 3600) // 60 %}
{{ "%02d:%02d"|format(hours, minutes) }}
{% else %}
{{ check_in_time }}
{% endif %}
{% endif %}
{% else %}
N/A
{% endif %}
</div>
</td>
<td class="address-column">