node.js - moment returns wrong value -
i'm parsing date using momentjs
:
var startdate = moment.utc('2016-02-20t07:00:00.000z')
if i'm writing startdate.toisostring()
console, this:
2016-02-19t21:00:00.000z
the startdate
object looks this:
{ [number: 1455915600000] _isamomentobject: true, _i: '2016-02-20t07:00:00.000z', _f: 'yyyy-mm-ddthh:mm:ss.ssssz', _tzm: -0, _isutc: true, _pf: { empty: false, unusedtokens: [], unusedinput: [], overflow: -1, charsleftover: 0, nullinput: false, invalidmonth: null, invalidformat: false, userinvalidated: false, iso: true }, _locale: locale { _ordinalparse: /\d{1,2}(th|st|nd|rd)/, ordinal: [function], _abbr: 'en', _ordinalparselenient: /\d{1,2}(th|st|nd|rd)|\d{1,2}/ }, _d: fri feb 19 2016 22:00:00 gmt+0100 (cet), _isvalid: true, _offset: 0 }
where difference result from?
Comments
Post a Comment