Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit e8f8371

Browse files
Fix SQL data source test.
1 parent 75ece70 commit e8f8371

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/java/com/google/visualization/datasource/util/SqlDataSourceHelperTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,12 @@ public void testBuildDataTableRows() throws SQLException {
314314
gc.set(GregorianCalendar.MILLISECOND, 0);
315315

316316
Date date = new Date(gc.getTimeInMillis());
317-
Time time = new Time(gc.getTimeInMillis());
318-
Timestamp timestamp = new Timestamp(gc.getTimeInMillis());
317+
Time time = new Time(gc.get(GregorianCalendar.HOUR), gc.get(GregorianCalendar.MINUTE),
318+
gc.get(GregorianCalendar.SECOND));
319+
Timestamp timestamp = new Timestamp(
320+
gc.get(GregorianCalendar.YEAR) - 1900, gc.get(GregorianCalendar.MONTH),
321+
gc.get(GregorianCalendar.DAY_OF_MONTH), gc.get(GregorianCalendar.HOUR),
322+
gc.get(GregorianCalendar.MINUTE), gc.get(GregorianCalendar.SECOND), 0);
319323

320324
// Create the table rows.
321325
List<Object> row1 =

0 commit comments

Comments
 (0)