#feature: update timezone

This commit is contained in:
tradewind committed 2025-12-31 13:40:42 +08:00
1 parent cd1e3d4859
commit e479ed02ea
5 files changed
+22 -8

No files matched your search

+17
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');
}
}