我的问题是关于Faker。 我需要在创建日期添加一个小时 像这样:
MyEntity:
startAt: '<dateTimeBetween("- 10 days", "now")>'
endAt: $startAt + 1 hour
感谢您的帮助。
答案 0 :(得分:0)
那还不存在。需要创建自定义提供程序
像这样:
public static function manipulateTime($date, $action = '-30 years')
{
$date = new \DateTime($date->format('Y-m-d H:i:s'));
$date->modify($action);
return $date;
}