]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix test for fractional-hour offsets
authorMatt Johnson <mj1856@hotmail.com>
Thu, 9 Jul 2015 18:14:05 +0000 (11:14 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 13 Jul 2015 00:44:30 +0000 (17:44 -0700)
src/test/moment/utc.js

index 00ad215967e7d00b257b6457de8529745380750a..6dc111f67e111171324757607562203cbf796e80 100644 (file)
@@ -20,7 +20,7 @@ test('utc and local', function (assert) {
         assert.equal(m.date(), 2, 'the date should be correct for local');
         assert.equal(m.day(), 3, 'the day should be correct for local');
     }
-    offset = Math.ceil(m.utcOffset() / 60);
+    offset = Math.floor(m.utcOffset() / 60);
     expected = (24 + 3 + offset) % 24;
     assert.equal(m.hours(), expected, 'the hours (' + m.hours() + ') should be correct for local');
     assert.equal(moment().utc().utcOffset(), 0, 'timezone in utc should always be zero');