javascript - How can I get Current Local Time in California, United States using Moment.js? -
i searched doing can time zone of country
var la = moment.tz("america/los_angeles").format('yyyy-mm-dd hh:mm:ssz');
but when california
no time zone available ?
running fiddle running example
solution :america/tijuana have same timezone america/california
because california
not valid iana time zone identifier.
also the moment-timezone docs:
the
moment.tz
constructor takes same arguments moment constructor, uses last argument time zone identifier.
what do? use america/los_angeles
, or other identifier in same time zone need.
Comments
Post a Comment