lundi 11 mars 2019

Date is wrong when JS passed a Date in PHP

I am using Laravel 5.7 and I am having a problem with the date string being passed from JS to PHP.

Before I passed the date in Vue JS and I put a console.log() to see the actual value and I have this:

Fri Feb 01 2019 00:00:00 GMT+0800 (Philippine Standard Time)

and then when I receive it to Laravel Controller, I \Log::info() to show the value being received but I have this:

2019-01-31T16:00:00.000Z

does anyone encountered the same problem and managed to fix it? Please help



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire