vishnu vishnu - 5 months ago 78
AngularJS Question

angularjs convert date format to IST

I want to convert date from 2015-12-02T18:30:00.000+0000 to Wed Dec 02 2015 00:00:00 GMT+0530 (India Standard Time) using angularjs.


you can make use of angular's date filter . The formats are clearly given here

{{'2015-12-02T18:30:00.000+0000' | date:"EEE MMM dd yyyy HH:hh:ss 'GMT'Z '(India Standard Time)'"}}

The above code snippet will give you Thu Dec 03 2015 00:12:00 GMT+0530 (India Standard Time) in the output. that is the time when you calculate from +0000 to a +0530

Here is a working solution