angular-timer
angular-timer copied to clipboard
UTC to local time's timestamp?
I'm unsure how to get the directive to display in local time? My server app (Laravel) returns time in UTC (ISO 8601).
For example:
2016-08-06T09:11:01Z
This is about 7 hours late compared to my timezone.
The angular relative date directive would return correct localized time:
{{feed.date | relativeDate}}
Output: 2 mins ago
But I'm not sure how to convert that to the timestamp that can be used for the timer to display in local time? This wouldn't show the right end-time in my timezone.
<timer end-time="feed.time*1000">@{{hhours}}h</timer>
Note that feed.time is a equivalent timestamp of feed.date that is being used in the angular relative time above.