javascript - Angular Timer - UTC to local time's timestamp? -
i'm unsure how angular timer directive display countdown in local time? server app (laravel) returns time in utc (iso 8601).
for example: 2016-08-06t09:11:01z
7 hours late compared timezone.
the angular relative date directive return correct localized time: {{feed.date | relativedate}}
output: 2 mins ago
but i'm not sure how convert timestamp can used timer display in local time? wouldn't show right end-time
in timezone.
<timer end-time="feed.time*1000">@{{hhours}}h</timer>
feed.time
1470448297
use angular moment,
to relative time :
<span am-time-ago="feed.date"></span>
you can check docs other applications.
Comments
Post a Comment