From 4589a277fe24380119411ad301745688bf0b6eea Mon Sep 17 00:00:00 2001 From: kang <1605821834@qq.com> Date: Sat, 11 Feb 2023 10:19:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dformat=5Fdatetime=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=9C=A8$datetime=E4=B8=BA=E6=AD=A3=E5=B8=B8=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E6=A0=BC=E5=BC=8F=E4=B8=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common.php b/src/common.php index cc3839f3..de3d96a8 100644 --- a/src/common.php +++ b/src/common.php @@ -428,8 +428,10 @@ if (!function_exists('format_datetime')) { return '-'; } elseif (is_numeric($datetime)) { return date(lang($format), intval($datetime)); - } else { + }elseif (strtotime($datetime)) { return date(lang($format), strtotime($datetime)); + }else{ + return $datetime; } } } \ No newline at end of file -- Gitee