From 3222513609a73794e76cbef634c1cea5c486d17d Mon Sep 17 00:00:00 2001 From: filesite Date: Thu, 11 Jul 2024 15:25:44 +0800 Subject: [PATCH] improve create date of files --- themes/beauty/views/site/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 27aacea..1706255 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -227,9 +227,9 @@ eof; } $title = !empty($file['title']) ? $file['title'] : $file['filename']; - //图片、视频显示文件创建日期 - if (!empty($file['fstat']['ctime'])) { - $title = date('Y-m-d', $file['fstat']['ctime']); + //图片、视频显示文件修改日期 + if (!empty($file['fstat']['mtime']) && !empty($file['fstat']['ctime'])) { + $title = date('Y-m-d', min($file['fstat']['mtime'], $file['fstat']['ctime'])); } if ($index > 0) {