You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpdump(config('app.timezone'));
// OUTPUT: "UTC"// We create a Carbon instance with timezone set to "GMT+3"$date_in_local_timezone = Carbon::now('GMT+3');
// Let's see the date we had initiallydump($date->toIso8601String())
// OUTPUT: "2015-01-01T12:00:00+0300"// We then save it as "date" field$model->some_date = $date_in_local_timezone;
$model->save();
// And then read it back from the modeldump($model->fresh()->some_date->toIso8601String());
// OUTPUT: "2015-01-01T12:00:00+0000"
As you can see we have the same datetime string but with timezone stripped.
I have my solution in the full note mentioned above.
Is it something to make a PR for or am I missing something?