I'm using angularjs and ionic on frontent and php (slim) at the backend. html:
<input type="date" name="birthday" ng-model="user.birthday" required>
php:
$app->post('/auth/signup', function () use ($app, $user_model, $config) {
$data = json_decode($app->request()->getBody(), true);
error_log($data['birthday']); //1111-11-10T20:00:00.000Z
I have a date field for getting birth date. But when it posts, I want it to just post "1111-11-11" but it posts as "Date {Sat Nov 11 1111 00:00:00 GMT+0400 (EET)}". When I get print from php it becomes "1111-11-10T22:00:00.000Z" because of the timezone difference, date changes.
I couldn't find how to fix the situation. I want the date roller, so I don't want to seperate day - month - year fields.
Thanks in advance.