From: elad Date: Wed, 29 Oct 2014 15:12:12 +0000 (+0200) Subject: Propagate a _zn property if it exists and update offset by default. X-Git-Tag: 2.9.0~21^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e695ead92b78e623ddda278327dd00ae82d936a6;p=thirdparty%2Fmoment.git Propagate a _zn property if it exists and update offset by default. --- diff --git a/moment.js b/moment.js index 747ab7fe4..4cc800b3a 100644 --- a/moment.js +++ b/moment.js @@ -379,6 +379,9 @@ } copyConfig(this, config); this._d = new Date(+config._d); + if (moment.updateOffset) { + moment.updateOffset(this); + } } // Duration Constructor @@ -473,6 +476,9 @@ if (typeof from._locale !== 'undefined') { to._locale = from._locale; } + if (typeof from._zn !== 'undefined') { + to._zn = from._zn; + } if (momentProperties.length > 0) { for (i in momentProperties) { @@ -1790,6 +1796,8 @@ config._i = input = config._locale.preparse(input); } + config._zn = config._zn || moment._zn || null; + if (moment.isMoment(input)) { return new Moment(input, true); } else if (format) {