Skip to content

Commit

Permalink
Failing timezone unit tests #188
Browse files Browse the repository at this point in the history
  • Loading branch information
timrwood committed Mar 2, 2012
1 parent de853b5 commit 2122ca5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/moment/format.js
Expand Up @@ -78,7 +78,11 @@ exports.format = {
if (moment().zone() == 0) {
test.ok(moment().format('ZZ').indexOf('+') > -1, 'When the zone() offset is equal to 0, the ISO offset should be positive zero');
}
test.ok(moment().zone() % 30 === 0, 'moment.fn.zone should be a multiple of 30 (was ' + moment().zone() + ')');
if (moment().zone() === 0) {
test.equal(moment().zone(), 0, 'moment.fn.zone should be a multiple of 30 (was ' + moment().zone() + ')');
} else {
test.equal(moment().zone() % 30, 0, 'moment.fn.zone should be a multiple of 30 (was ' + moment().zone() + ')');
}
test.equal(moment().zone(), new Date().getTimezoneOffset(), 'zone should equal getTimezoneOffset');
test.done();
},
Expand Down

0 comments on commit 2122ca5

Please sign in to comment.