Co-authored-by: aider (deepseek/deepseek-v4-pro) <aider@aider.chat>
@@ -149,8 +149,8 @@ def upload():
# 提取缩略图
thumbnail = extract_thumbnail(html_body)
- # 生成日期
- date_iso = datetime.now(timezone.utc).isoformat()
+ # 生成日期(精确到分钟)
+ date_iso = datetime.now(timezone.utc).replace(second=0, microsecond=0).isoformat()
# 生成静态页面
generate_static_page(post_id, title, html_body, date_iso, thumbnail)
@@ -20,7 +20,7 @@
<td>
<a href="{{ url_for('view_post', post_id=post.id) }}">{{ post.title }}</a>
</td>
- <td>{{ post.date[:10] }}</td>
+ <td>{{ post.date[:16] | replace('T', ' ') }}</td>
<form method="POST" action="{{ url_for('delete_post', post_id=post.id) }}" onsubmit="return confirm('确定要删除「{{ post.title }}」吗?此操作不可恢复。');">
<button type="submit" class="btn btn-danger">删除</button>
@@ -16,7 +16,7 @@
<h2 class="card-title">
</h2>
- <time class="card-date" datetime="{{ post.date }}">{{ post.date[:10] }}</time>
+ <time class="card-date" datetime="{{ post.date }}">{{ post.date[:16] | replace('T', ' ') }}</time>
<div class="card-summary">{{ post.content | safe }}</div>
<a href="{{ url_for('view_post', post_id=post.id) }}" class="card-link">阅读全文 →</a>
</div>
@@ -11,7 +11,7 @@
{% endif %}
<div class="card-body">
<h1 class="card-title">{{ title }}</h1>
- <time class="card-date" datetime="{{ date }}">{{ date[:10] }}</time>
+ <time class="card-date" datetime="{{ date }}">{{ date[:16] | replace('T', ' ') }}</time>
<div class="card-summary">
{{ content | safe }}