I want to use the Postgres timstamp with timezone data type.
My migration has this line:
$table->dateTimeTz('local_timestamp');
I try to seed like this:
$note->local_timestamp = Carbon::now();
I have also tried to format it like this when I seed it:
$note->local_timestamp = Carbon::now()->format('Y-m-d H:i:sO');
I retrieve my seeded data like this:
$data = Note::where('owner', $owner)->get();
And I get an InvalidArgumentException "Data missing" in Carbon error that shows this:
at Carbon::rawCreateFromFormat('Y-m-d H:i:sO', '2019-03-28 14:02:42', null)
I have tried including this line in my model because I've seen it suggested as the answer on other similar questions:
protected $dateFormat = 'Y-m-d H:i:sO';