Hey there! I've come across an issue with my AngularJS
filter, where it's supposed to return a date in a specific format. However, when I try the following code:
var input = '2015-08-11T13:00:00';
var format = 'yyyy MMM dd - hh:mm:ss';
return $filter('date')(new Date(input), format);
The output is 2015 Aug 04 - 01:00:00
instead of 2015 Aug 04 - 13:00:00
. Can anyone explain why this is happening and provide a solution that will work for any format?