#feature: update timezone

This commit is contained in:
2025-12-31 13:40:42 +08:00
parent cd1e3d4859
commit e479ed02ea
5 changed files with 22 additions and 8 deletions

17
app/Models/BaseModel.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
namespace App\Models;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
abstract class BaseModel extends Model
{
/**
* 序列化日期时使用应用时区格式。
*/
protected function serializeDate(DateTimeInterface $date): string
{
return $date->format('Y-m-d H:i:s');
}
}