postgresql-jdbc.git / summary / log / commit / refs
commit 4874f9a693a3bb1c2ddcbfcbc916b5ce0ce1b5f6
Author: Dave Cramer <dave.cramer@credativ.ca>
Date: Sat Oct 25 06:43:25 2014 +0000
Fixed timezone test as per Tom Lane's suggestion.
Now using Europe/Helsinki as the exemplar.
org/postgresql/test/jdbc2/TimezoneTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/org/postgresql/test/jdbc2/TimezoneTest.java b/org/postgresql/test/jdbc2/TimezoneTest.java
index 265e3c75..53d41796 100644
--- a/org/postgresql/test/jdbc2/TimezoneTest.java
+++ b/org/postgresql/test/jdbc2/TimezoneTest.java
@@ -69,7 +69,7 @@ public class TimezoneTest extends TestCase
protected void setUp() throws Exception
{
// We must change the default TZ before establishing the connection.
- TimeZone.setDefault(TimeZone.getTimeZone("GMT+01")); // Arbitary timezone that doesn't match our test timezones
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT+01")); // Arbitrary timezone that doesn't match our test timezones
con = TestUtil.openDB();
TestUtil.createTable(con, "testtimezone",
@@ -692,12 +692,12 @@ public class TimezoneTest extends TestCase
return;
Statement stmt = con.createStatement();
- stmt.execute("SET TimeZone = 'Europe/Helsinki'");
+ stmt.execute("SET TimeZone = 'Europe/Paris'");
ResultSet rs = stmt.executeQuery("SELECT '1920-01-01'::timestamptz");
rs.next();
// select extract(epoch from '1920-01-01'::timestamptz - 'epoch'::timestamptz) * 1000;
- assertEquals(-1577929192000L, rs.getTimestamp(1).getTime());
+ assertEquals(-1577923200000L, rs.getTimestamp(1).getTime());
}
/**
[parent: 6be85f87a196]