Closed ghost closed 6 years ago
The format is a date you have to transform before the post. Normally http libraries transform the js date to a Json.
The conversion to mysql should be done by the backend service.
I found the solution;
date: moment($scope.reminder_date).format("YYYY-MM-DD HH:mm:ss"),
Ok you are converting the date to a string format, but you are losing the client timezone.
$scope.reminder_date.toJSON()
2017-11-03T18:25:43.511Z
Just make sure your server is set to GMT+0300. Some Linux distribution are set to UTC.
There is now way post for mysql format.
Current post format: Mon Dec 11 2017 23:40:51 GMT+0300 (+03)
It should be for mysql; 2017-11-03 23:40:51