songxingwei il y a 2 ans
Parent
commit
7af30d77b4

+ 1 - 1
app/data/model/DataUserRepair.php

@@ -18,7 +18,7 @@ class DataUserRepair extends Model
      */
     public function getCreateAtAttr(string $value): string
     {
-        return format_datetime($value);
+        return format_datetime($value,'Y-m-d H:i');
     }
     public function getImgsAttr($_,$model){
         return array_filter(explode(',',$model['imgs']));

+ 1 - 1
vendor/zoujingli/think-library/src/common.php

@@ -421,7 +421,7 @@ if (!function_exists('format_datetime')) {
      * @param string $format 输出格式
      * @return string
      */
-    function format_datetime($datetime, string $format = 'Y-m-d H:i:s'): string
+    function format_datetime($datetime, string $format = 'Y年m月d日 H:i:s'): string
     {
 
         if (empty($datetime)) {