]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Propagate a _zn property if it exists and update offset by default.
authorelad <elad@iNNU.ORG>
Wed, 29 Oct 2014 15:12:12 +0000 (17:12 +0200)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 24 Dec 2014 21:35:13 +0000 (13:35 -0800)
moment.js

index 747ab7fe4793ddc6a6576196c9cdef863afd8a7d..4cc800b3ad578939d13954cae5d9383917e10427 100644 (file)
--- a/moment.js
+++ b/moment.js
         }
         copyConfig(this, config);
         this._d = new Date(+config._d);
+        if (moment.updateOffset) {
+            moment.updateOffset(this);
+        }
     }
 
     // Duration Constructor
         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) {
             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) {