fix: 修复 AI 查询页面时间戳类型错误

- 修复 date() 函数接收字符串而非整数的问题
- 在所有 date() 调用中使用 intval() 转换时间戳
- 修复生成时间、检测时间、记录时间的显示问题
This commit is contained in:
2026-01-26 13:03:43 +08:00
parent 33d2b23408
commit a9259eaea1

View File

@@ -494,7 +494,7 @@ html.darkmode .ai-verify-subtitle { color: #aaa; }
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('生成时间', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html(date('Y-m-d H:i:s', $result['generated_time'])); ?></span>
<span class="ai-info-value"><?php echo esc_html(date('Y-m-d H:i:s', intval($result['generated_time']))); ?></span>
</div>
</div>
@@ -628,7 +628,7 @@ html.darkmode .ai-verify-subtitle { color: #aaa; }
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('检测时间', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html(date('Y-m-d H:i:s', $result['detection_time'])); ?></span>
<span class="ai-info-value"><?php echo esc_html(date('Y-m-d H:i:s', intval($result['detection_time']))); ?></span>
</div>
</div>
@@ -836,7 +836,7 @@ if (current_user_can('manage_options')):
<td><span class="ai-record-code"><?php echo esc_html($record['code']); ?></span></td>
<td><span class="ai-record-title"><?php echo esc_html($record['title']); ?></span></td>
<td class="ai-record-time">
<?php echo $record['time'] ? date('Y-m-d H:i', $record['time']) : __('未知', 'argon'); ?>
<?php echo $record['time'] ? date('Y-m-d H:i', intval($record['time'])) : __('未知', 'argon'); ?>
</td>
</tr>
<?php endforeach; ?>