fix: mobile 文章列表发布时间问题

This commit is contained in:
2025-06-21 10:21:32 +08:00
parent 9a220bbb97
commit c5f88098f5
2 changed files with 2 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ if (!function_exists('date_format_i18n')) {
* @param bool $keep_time 是否保留时间 * @param bool $keep_time 是否保留时间
* @return string * @return string
*/ */
function date_format_i18n(int|string $datetime, string $lang = '', bool $keep_time = false): string function date_format_i18n(int|string|null $datetime, string $lang = '', bool $keep_time = false): string
{ {
// 处理语言标识,若未提供则使用当前语言设置,并转换为小写 // 处理语言标识,若未提供则使用当前语言设置,并转换为小写
$lang = $lang ?: Lang::getLangSet(); $lang = $lang ?: Lang::getLangSet();

View File

@@ -45,7 +45,7 @@
<h3>{$ar.title}</h3> <h3>{$ar.title}</h3>
<p>{$ar.desc|raw}</p> <p>{$ar.desc|raw}</p>
</a> </a>
<span class="blue">{$ar.release_time|default=''|date='Y-m-d'}</span> <span class="blue">{$ar.release_time|date_format_i18n}</span>
</li> </li>
{/volist} {/volist}
</ul> </ul>