]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[bugfix] Support unusual historic timezone offsets (fixes #5236) (#5237)
authorAsh <ash@hexmen.com>
Thu, 23 Apr 2020 19:12:05 +0000 (20:12 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Apr 2020 19:12:05 +0000 (22:12 +0300)
src/lib/units/offset.js

index 752358f0d8c367b3bfebe1e7acca003f733402be..f670ccc3e977fe12b1381b1ff295924c871cbcc1 100644 (file)
@@ -81,7 +81,7 @@ export function cloneWithOffset(input, model) {
 function getDateOffset (m) {
     // On Firefox.24 Date#getTimezoneOffset returns a floating point.
     // https://github.com/moment/moment/pull/1871
-    return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
+    return -Math.round(m._d.getTimezoneOffset());
 }
 
 // HOOKS