fix: standardize UTC timestamp handling

This commit is contained in:
2026-07-08 10:07:08 +08:00
parent 22dd364405
commit 8d347cfbc2
8 changed files with 77 additions and 24 deletions
+2 -2
View File
@@ -72,7 +72,7 @@
{% for user in password_reset_users %}
<tr class="hover:bg-slate-50">
<td class="px-4 py-3 font-semibold">{{ user.username }}</td>
<td class="px-4 py-3 text-textSub">{{ user.created_at.strftime('%Y-%m-%d %H:%M:%S') if user.created_at else '-' }}</td>
<td class="px-4 py-3 text-textSub">{{ format_datetime(user.created_at) }}</td>
<td class="px-4 py-3">
<form method="post" action="{{ url_for('main.create_password_reset_link', user_id=user.id) }}" data-reset-link-form class="inline-flex">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
@@ -117,7 +117,7 @@
<tr class="hover:bg-slate-50">
<td class="px-5 py-4 font-semibold">{{ record.user.username }}</td>
<td class="max-w-[420px] truncate px-5 py-4">{{ record.original_filename }}</td>
<td class="px-5 py-4 text-textSub">{{ record.upload_time.strftime('%Y-%m-%d %H:%M:%S') }}</td>
<td class="px-5 py-4 text-textSub">{{ format_datetime(record.upload_time) }}</td>
<td class="px-5 py-4">
<div class="flex flex-wrap gap-3">
<a class="font-bold text-primary" href="{{ url_for('main.download_file', record_id=record.id, file_type='original') }}">原始文件</a>
+1 -1
View File
@@ -31,7 +31,7 @@
<div class="min-w-0 overflow-hidden">
<div class="truncate text-sm font-bold">{{ record.original_filename }}</div>
<div class="mt-1 flex flex-wrap items-center gap-2 text-xs text-textSub">
<span>{{ record.upload_time.strftime('%Y-%m-%d %H:%M:%S') }}</span>
<span>{{ format_datetime(record.upload_time) }}</span>
<span class="hidden sm:inline">·</span>
<span>记录 #{{ record.id }}</span>
</div>