]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
rounding getTimeZoneOffset for FF 24 bug
authorAdam Kucharczyk <akucharczyk@nxsystems.eu>
Wed, 20 Aug 2014 16:09:13 +0000 (17:08 +0059)
committerIskren Chernev <iskren.chernev@gmail.com>
Fri, 5 Sep 2014 06:33:11 +0000 (23:33 -0700)
moment.js

index 0c19f59df66c78f0bbfec0ed65c939dfcf80ecb8..bf2dab47e9d8c21ba3a588ab6010e8a7d4de5dce 100644 (file)
--- a/moment.js
+++ b/moment.js
                 this._isUTC = false;
 
                 if (keepLocalTime) {
-                    this.add(this._d.getTimezoneOffset(), 'm');
+                    this.add(Math.round(this._d.getTimezoneOffset()), 'm');
                 }
             }
             return this;
                     input = input * 60;
                 }
                 if (!this._isUTC && keepLocalTime) {
-                    localAdjust = this._d.getTimezoneOffset();
+                    localAdjust = Math.round(this._d.getTimezoneOffset());
                 }
                 this._offset = input;
                 this._isUTC = true;
                     }
                 }
             } else {
-                return this._isUTC ? offset : this._d.getTimezoneOffset();
+                return this._isUTC ? offset : Math.round(this._d.getTimezoneOffset());
             }
             return this;
         },