From 1ccaced113c6d1f3daf095aa9beb515eff8296c9 Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Wed, 16 Jul 2025 13:58:51 +0800 Subject: [PATCH] 1 --- app/model/Follow.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/model/Follow.php b/app/model/Follow.php index fcbdad6..4298133 100644 --- a/app/model/Follow.php +++ b/app/model/Follow.php @@ -38,10 +38,6 @@ class Follow extends Model */ public $timestamps = true; - protected $dates = ['created_at', 'updated_at', 'follow_time']; - - protected $timezone = 'Asia/Shanghai'; - protected $casts = [ 'updated_at' => 'datetime:Y-m-d H:i:s', // 指定序列化格式 'created_at' => 'datetime:Y-m-d H:i:s', // 指定序列化格式 @@ -61,6 +57,8 @@ class Follow extends Model }else { $follow['oss_picture'] = ''; } + $follow['created_at'] = date('Y-m-d H:i:s',strtotime($follow['created_at'])+(3600*8)); + $follow['updated_at'] = date('Y-m-d H:i:s',strtotime($follow['updated_at'])+(3600*8)); // $follow = Util::formatDate($follow); return $follow; }