From: Matt Johnson Date: Thu, 9 Jul 2015 18:14:05 +0000 (-0700) Subject: Fix test for fractional-hour offsets X-Git-Tag: 2.10.5~18^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aeea46fe20752010687403d3d67eedfa8bc233d;p=thirdparty%2Fmoment.git Fix test for fractional-hour offsets --- diff --git a/src/test/moment/utc.js b/src/test/moment/utc.js index 00ad21596..6dc111f67 100644 --- a/src/test/moment/utc.js +++ b/src/test/moment/utc.js @@ -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');