Monday, August 19, 2019

How to convert UTC timer to local in Angular


Help Request
I don't know whether this is an angular specific question or not but what is the best way to convert from uTC to local time ?
i receive a UTC datetime string eg: 2019/08/09:12:30:00Z from a web API, and i want to convert it to local time for the user, i tried
to do it like this
this.timerdate = new Date(receiveDate);
but the timer stays UTC don't
Please help me.

No comments:

Post a Comment