I am using Carbon with Laraval, my local timezone is in IST. I am passing the below ISO string from the UI.
2019-11-22T03:00:00.000Z
When parsed on the server with the below syntax:
\Carbon\Carbon::parse($value)->timezone($this->user->timezone)->format('Y-m-d H:m:s');
The output I am getting is :
2019-11-22 03:11:00
Don't know why I am getting the additional 11 minutes in the time. UI and Server both runs in my local machine. Don't know what's causing the 11 minutes addition.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire