javascript - new Date() with ISO 8061 date creates date according to timezone -
if create date object new date('2015-03-25') , i'm getting object tue mar 24 2015 16:00:00 gmt-0800 (akdt). expected ?
is expected?
unfortunately ecma tc39 decided date forms of iso 8601 strings should treated utc , not local (per iso 8601).
you might care read matt johnson's blog on issue.
the only reliable way parse date strings manually. library can help, not necessary.
Comments
Post a Comment