From 8728f6d9063ed96219f059026b1e525d9719d84e Mon Sep 17 00:00:00 2001 From: Adam Kucharczyk Date: Wed, 20 Aug 2014 17:08:13 +0059 Subject: [PATCH] rounding getTimeZoneOffset for FF 24 bug --- moment.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moment.js b/moment.js index 0c19f59df..bf2dab47e 100644 --- a/moment.js +++ b/moment.js @@ -2136,7 +2136,7 @@ this._isUTC = false; if (keepLocalTime) { - this.add(this._d.getTimezoneOffset(), 'm'); + this.add(Math.round(this._d.getTimezoneOffset()), 'm'); } } return this; @@ -2345,7 +2345,7 @@ input = input * 60; } if (!this._isUTC && keepLocalTime) { - localAdjust = this._d.getTimezoneOffset(); + localAdjust = Math.round(this._d.getTimezoneOffset()); } this._offset = input; this._isUTC = true; @@ -2363,7 +2363,7 @@ } } } else { - return this._isUTC ? offset : this._d.getTimezoneOffset(); + return this._isUTC ? offset : Math.round(this._d.getTimezoneOffset()); } return this; }, -- 2.47.2