Using AngularJS date filter with UTC date

后端 未结 10 2276
無奈伤痛
無奈伤痛 2020-11-28 07:35

I have an UTC date in milliseconds which I am passing to Angular\'s date filter for human formatting.

{{someDate | date:\'d MMMM yyyy\'}}

A

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 08:01

    After some research I was able to find a good solution for converting UTC to local time, have a a look at the fiddle. Hope it help

    https://jsfiddle.net/way2ajay19/2kramzng/20/

    
    
    
    {{date | date:'yyyy-mm-dd hh:mm:ss' }}

提交回复
热议问题