2

i am using angularjs filter date. i have used this one

 var date = new Date("09 apr 2015 12:00:50 UT");
 $filter('date')(date, "dd MMM yyyy  hh:mm:ss a Z");

Output:

 09 Apr 2015 08:19:04 PM  +5:30 

i need output:

09 Apr 2015 08:19:04 PM GMT +5:30 (IST)

1 Answer 1

3

i don't think you can do it out of the box with plain angular.js, but you can use a library like angular-moment. moment.js supports variety of formats: http://momentjs.com/docs/#/displaying/format/

Sign up to request clarification or add additional context in comments.

1 Comment

That seems to be the case. Angular documentation for date filter does not mention timezones in other form than +XXXX: docs.angularjs.org/api/ng/filter/date.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.