fix: mobile 文章列表发布时间问题
This commit is contained in:
@@ -120,7 +120,7 @@ if (!function_exists('date_format_i18n')) {
|
||||
* @param bool $keep_time 是否保留时间
|
||||
* @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();
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<h3>{$ar.title}</h3>
|
||||
<p>{$ar.desc|raw}</p>
|
||||
</a>
|
||||
<span class="blue">{$ar.release_time|default=''|date='Y-m-d'}</span>
|
||||
<span class="blue">{$ar.release_time|date_format_i18n}</span>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user