convert UTC to local time using angularjs

前端 未结 4 2026
梦谈多话
梦谈多话 2020-12-16 01:08

As a response from the json I am getting the UTC timezone. I need to convert it to local time.

{{trans.txnDate}}         


        
4条回答
  •  离开以前
    2020-12-16 01:51

    I had the same issue. Below Answer

    {{trans.txnDate | date:'yyyy-MM-dd HH:mm:ss Z':'+0530' }} 
    //You can also set '+0000' or another UTX timezome
    

提交回复
热议问题