I have created an application in angularjs in which i have added a javascript date for the date 21/10/2014 07:30AM
, To make it into date object i did like as shown below
new Date(2014, 10, 21, 07, 30);
but interestingly when i print it out i got like
2014-11-21T13:30:00.000Z
My code is as given below
var app = angular.module('myApp', []);
app.controller('Controller', function ($scope) {
$scope.myValues = {};
$scope.myValues.start = new Date(2014, 10, 21, 07, 30);
});
Can anyone please tell me why the time is different, also how can i correct that since i am saving this in database through php, Also many areas i need to get only the time