Skip to content

Commit 9c7d827

Browse files
committed
Merge pull request #600 from nanek/fix-timezone-test
Fixed timezone test not to be dependent on the millisecond executed.
2 parents 84ace46 + 4c02e0e commit 9c7d827

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_js:
33
- 0.4
44
- 0.6
55
- 0.8
6+
- 0.10

test/integration/connection/test-timezones.js

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ function testNextDate() {
3333
function testDate(offset, cb) {
3434
var dt = new Date();
3535

36+
// datetime will round fractional seconds up, which causes this test to fail
37+
// depending on when it is executed. MySQL 5.6.4 and up supports datetime(6)
38+
// which would not require this change.
39+
// http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
40+
dt.setMilliseconds(0);
41+
3642
if (offset == 'Z' || offset == 'local') {
3743
connection.config.timezone = offset;
3844
} else {

0 commit comments

Comments
 (0)