laravel orm日期字段返回返回值问题
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 251
- PR merge metrics
- No merged PRs in 30d
Description
`
* @copyright walkor
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace support;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Model as BaseModel;
class Model extends BaseModel
{
/**
* 日期字段格式化为当前app.default_timezone时区返回,默认为UTC 0时区返回
* @param DateTimeInterface $date
* @return string
*/
protected function serializeDate(DateTimeInterface $date): string
{
return $date->format('Y-m-d H:i:s');
}
}
`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the support\Model::serializeDate method shown in the issue and compare its behavior with Laravel Eloquent date serialization and the application's default timezone setting. The expected date value, timezone behavior, and affected test or reproduction are not specified; confirm those requirements before determining what would count as done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100