I have a reservation calendar, where I can click on day and time, so I open a bootstrap modal where there is a date input and a time input.
I'm using on the modal load with "date" parameter:
$scope.calendarChosenDay = $filter('date')(new Date(date), 'yyyy-MM-dd');
$scope.calendarChosenTime = $filter('date')(new Date(date), 'HH:mm');
When the modal opens, the date is correct, but the time is adding 2 hours because of timezone i guess.
What should I add to the filter, to take the current timezone like now its 1:40 pm it s giving me 3:40 pm, I want it to be 1:40. Any help?