ngx-moment icon indicating copy to clipboard operation
ngx-moment copied to clipboard

Time/Date is changed with amDateFormat

Open vapits opened this issue 8 years ago • 4 comments

Hi there, I'm guessing this is related with timezones (well ye) but I cannot find a way to resolve it. In my case I have something like this:

<time>{{mydate | amDateFormat:'dddd DD/MM/YYYY HH:mm'}}</time>

where mydate is 2016-09-02T14:15:00.000Z. And the result I get is one or two hours ahead from this depending the date and the UTC offset.

How can I fix it? Is there any option available somewhere because I cannot find anything in the docs.

vapits avatar Oct 05 '16 14:10 vapits

@vapits Did you figure out how to deal with? I'm facing the same problem...

ebosantos avatar Dec 05 '16 22:12 ebosantos

Actually on the angular1 version, they have amUtc option. It'd be awesome if version 2 has as well.

ebosantos avatar Dec 05 '16 22:12 ebosantos

@ebosantos unfortunately there is no option in angular2 version as I understand so we have to wait. I left the issue opened for this reason.

vapits avatar Dec 06 '16 08:12 vapits

I've submitted PR #121 to bring amUtc to angular2-moment.

bodnarbm avatar Jan 20 '17 21:01 bodnarbm