angularJs 클라이언트 측 응용 프로그램에서 가져온 형식 시간이 2015-02-05T14:50:55+01:00
인 것으로 가정합니다.laravel이 ISO8601 형식의 날짜 시간을 인식하지 못함
이제 테이블에 MySQL을 DATETIME
으로 저장하고 싶습니다.
나는 iso 8601
형식의 날짜 시간을 알고 있습니다. 이 때문에 내 모델 코드 아래에 추가 :
protected $dateFormat = 'DATE_ISO8601';
하지만이 새로운 필드 내 모델을 업데이트 할 때이 오류가있어 :
A textual day could not be found
Meridian can only come after an hour has been found
The format separator does not match
The format separator does not match
The format separator does not match
The timezone could not be found in the database
Data missing {"userId":1,"email":"[email protected]","exception":"[object] (InvalidArgumentException(code: 0): A textual day could not be found
Meridian can only come after an hour has been found
The format separator does not match
The format separator does not match
The format separator does not match
The timezone could not be found in the database
Data missing at D:\\wamp\\www\\zarsystem\\vendor\
esbot\\carbon\\src\\Carbon\\Carbon.php:582)
[stacktrace]
#0 D:\\wamp\\www\\zarsystem\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes.php(715): Carbon\\Carbon::createFromFormat('DATE_ISO8601', '2015-02-05T14:5...')
내가
DATE_ATOM
같은 다른 미리 정의 된 상수 시도를 ,
DATE_W3C
, ...하지만 같은 erorrs 있어요.
혼란스러워서 어떻게해야합니까?
귀하의 타임 스탬프가 유효한 MySQL의'datetime' ([여기 참조] (하지 https://dev.mysql.com/doc/refman/5.7/en/datetime를 사용하는 것이 좋습니다 .html)). –