Skip to content

Commit

Permalink
Merge pull request #600 from nanek/fix-timezone-test
Browse files Browse the repository at this point in the history
Fixed timezone test not to be dependent on the millisecond executed.
  • Loading branch information
felixge committed Oct 1, 2013
2 parents 84ace46 + 4c02e0e commit 9c7d827
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_js:
- 0.4
- 0.6
- 0.8
- 0.10
6 changes: 6 additions & 0 deletions test/integration/connection/test-timezones.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ function testNextDate() {
function testDate(offset, cb) {
var dt = new Date();

// datetime will round fractional seconds up, which causes this test to fail
// depending on when it is executed. MySQL 5.6.4 and up supports datetime(6)
// which would not require this change.
// http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
dt.setMilliseconds(0);

if (offset == 'Z' || offset == 'local') {
connection.config.timezone = offset;
} else {
Expand Down

0 comments on commit 9c7d827

Please sign in to comment.