diff --git a/app/Console/Commands/AutomaticallyStartActivity.php b/app/Console/Commands/AutomaticallyStartActivity.php index c1a6439..01ebd6d 100644 --- a/app/Console/Commands/AutomaticallyStartActivity.php +++ b/app/Console/Commands/AutomaticallyStartActivity.php @@ -94,7 +94,7 @@ class AutomaticallyStartActivity extends Command $oldValue = $model->toArray(); $model->update([ 'status' => $status, - 'updated_at' => get_datetime() + 'updated_at' => date("Y-m-d H:i:s", time()) ]); // 记录日志 $this->logService->logUpdated($model, $oldValue); diff --git a/app/Models/EventCalendar.php b/app/Models/EventCalendar.php index 51228ba..e0a3811 100644 --- a/app/Models/EventCalendar.php +++ b/app/Models/EventCalendar.php @@ -30,11 +30,11 @@ class EventCalendar extends Model public function getStartTimeAttribute($value): string { - return get_datetime('date_time', strtotime($value)); + return date('Y-m-d H:i', strtotime($value)); } public function getEndTimeAttribute($value): string { - return get_datetime('date_time', strtotime($value)); + return date('Y-m-d H:i', strtotime($value)); } }