get time in user timezone angular 5 + ngx-moment

747 views Asked by At

I have response from server:

dateCreated = "2019-02-06T14:43:50+03:00"

And on UI I have:

{{ dateCreated | amTimeAgo }}

I want to see in result 1 hour ago, but I see 4 hours ago.

What other pipe should I add here or how can I resolve that problem?

1

There are 1 answers

0
Chris M On

I had the same issue. I used this:

{{ OccurredOn | amFromUtc | amDateFormat: 'YYYY-MM-DD h:mm:ss a' | amTimeAgo }}