Is there a better way to ignore an timezone in Angularjs:
\"2014-01-18 14:30:00\" Instead Of \"2014-01-18 15:30:00\"
function Scoper($scope) {
$
I found this answer: Why does angular date filter adding 2 to hour?
Here is an example:
app.filter('utc', function(){
return function(val){
var date = new Date(val);
return new Date(date.getUTCFullYear(),
date.getUTCMonth(),
date.getUTCDate(),
date.getUTCHours(),
date.getUTCMinutes(),
date.getUTCSeconds());
};
});
{{ date | utc | date:'yyyy-MM-dd HH:mm:ss' }}