Figure 1 shows the value of the variable printed before $http is sent;
Figure 2 shows the value captured when $http is sent.
Can I prevent it from automatically converting to UTC and keep 2016-12-15?
PHP中文网2017-05-15 17:12:05
Thanks for the invitation.
Your data itself is a time object, but if you want to post, its data format is forced to be converted to the related type of string.
It is recommended that you format the data into a corresponding string before posting.
You can use the date built-in filter in angular
app.controller('myCtrl', function($scope, $filter) {
console.log($filter('date')(new Date(), 'yyyy-MM-dd'))
});