From: Tim Wood Date: Fri, 4 May 2012 16:45:54 +0000 (-0430) Subject: Fixing unit tests in all timezones X-Git-Tag: 1.7.0~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf36b52a246caf95141192f3d790aaa9f4531ce9;p=thirdparty%2Fmoment.git Fixing unit tests in all timezones --- diff --git a/test/moment/utc.js b/test/moment/utc.js index c04805c11..26a66a28c 100644 --- a/test/moment/utc.js +++ b/test/moment/utc.js @@ -20,7 +20,7 @@ exports.utc = { test.equal(m.date(), 2, "the date should be correct for local"); test.equal(m.day(), 3, "the day should be correct for local"); } - var zone = (m.zone() > 0) ? Math.floor(m.zone() / 60) : Math.ceil(m.zone() / 60); + var zone = Math.ceil(m.zone() / 60); var expected = (24 + 3 - zone) % 24; test.equal(m.hours(), expected, "the hours (" + m.hours() + ") should be correct for local"); test.equal(moment().utc().zone(), 0, "timezone in utc should always be zero");