Changeset: 3d7220956b58 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3d7220956b58
Modified Files:
java/tests/Test_PStimezone.java
java/tests/build.properties
sql/jdbc/tests/Tests/Test_PStimezone.stable.out
Branch: Aug2011
Log Message:
Test_PStimezone: change to make it resistant against daylight savings
Change and approve timestamp test to hopefully fix the changes incurred
by daylight savings corrections. UTC should have no such thing.
diffs (114 lines):
diff --git a/java/tests/Test_PStimezone.java b/java/tests/Test_PStimezone.java
--- a/java/tests/Test_PStimezone.java
+++ b/java/tests/Test_PStimezone.java
@@ -60,7 +60,9 @@ public class Test_PStimezone {
// make sure this test is reproducable regardless
timezone
// setting, by overriding the VM's default
-
TimeZone.setDefault(TimeZone.getTimeZone("Africa/Windhoek"));
+ // we have to make sure that one doesn't have daylight
+ // savings corrections
+ TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
SimpleDateFormat tsz =
new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss.SSSZ");
@@ -146,7 +148,7 @@ public class Test_PStimezone {
rs.getTime("t", c) + "
\t" +
rs.getTime("tz", c) + " ");
- c.setTimeZone(TimeZone.getTimeZone("UTC"));
+
c.setTimeZone(TimeZone.getTimeZone("Africa/Windhoek"));
System.out.println(c.getTimeZone().getID() +
":\n\t" +
rs.getTimestamp("ts", c) + "
\t" +
rs.getTimestamp("tsz", c) + "
\t" +
diff --git a/java/tests/build.properties b/java/tests/build.properties
--- a/java/tests/build.properties
+++ b/java/tests/build.properties
@@ -6,4 +6,4 @@
debug=
# one can override the connection url as well
-#jdbc_url=jdbc:monetdb://localhost:53210/one?user=monetdb&password=monetdb
+jdbc_url=jdbc:monetdb://localhost:53210/one?user=monetdb&password=monetdb
diff --git a/sql/jdbc/tests/Tests/Test_PStimezone.stable.out
b/sql/jdbc/tests/Tests/Test_PStimezone.stable.out
--- a/sql/jdbc/tests/Tests/Test_PStimezone.stable.out
+++ b/sql/jdbc/tests/Tests/Test_PStimezone.stable.out
@@ -23,10 +23,11 @@ Ready.
# 15:11:19 > java Test_PStimezone
jdbc:monetdb://pictor:53368/database?user=monetdb&password=monetdb
# 15:11:19 >
+
0. false false
1. empty call... failed :)
2. inserting records...
-inserting (Africa/Windhoek) 1970-01-01 02:00:00.000+0200, 02:00:00.000+0200
+inserting (UTC) 1970-01-01 00:00:00.000+0000, 00:00:00.000+0000
inserting with calendar timezone UTC
inserting with calendar timezone America/Los_Angeles
inserting with calendar timezone GMT+04:15
@@ -34,40 +35,41 @@ done
3. closing PreparedStatement... passed :)
4. selecting records... passed :)
retrieved row (String):
- 1970-01-01 02:00:00.000000 1970-01-01 02:00:00.000000+02:00
02:00:00 02:00:00+02:00
-default (Africa/Windhoek):
- 1970-01-01 02:00:00.000+0200 1970-01-01 02:00:00.000+0200
02:00:00.000+0200 02:00:00.000+0200
+ 1970-01-01 00:00:00.000000 1970-01-01 01:00:00.000000+01:00
00:00:00 01:00:00+01:00
+default (UTC):
+ 1970-01-01 00:00:00.000+0000 1970-01-01 00:00:00.000+0000
00:00:00.000+0000 00:00:00.000+0000
America/Los_Angeles:
- 1970-01-01 12:00:00.0 1970-01-01 02:00:00.0
12:00:00 02:00:00
-UTC:
- 1970-01-01 04:00:00.0 1970-01-01 02:00:00.0
04:00:00 02:00:00
+ 1970-01-01 08:00:00.0 1970-01-01 00:00:00.0
08:00:00 00:00:00
+Africa/Windhoek:
+ 1969-12-31 22:00:00.0 1970-01-01 00:00:00.0
22:00:00 00:00:00
retrieved row (String):
- 1970-01-01 00:00:00.000000 1970-01-01 02:00:00.000000+02:00
00:00:00 02:00:00+02:00
-default (Africa/Windhoek):
- 1970-01-01 00:00:00.000+0200 1970-01-01 02:00:00.000+0200
00:00:00.000+0200 02:00:00.000+0200
+ 1970-01-01 00:00:00.000000 1970-01-01 01:00:00.000000+01:00
00:00:00 01:00:00+01:00
+default (UTC):
+ 1970-01-01 00:00:00.000+0000 1970-01-01 00:00:00.000+0000
00:00:00.000+0000 00:00:00.000+0000
America/Los_Angeles:
- 1970-01-01 10:00:00.0 1970-01-01 02:00:00.0
10:00:00 02:00:00
-UTC:
- 1970-01-01 02:00:00.0 1970-01-01 02:00:00.0
02:00:00 02:00:00
+ 1970-01-01 08:00:00.0 1970-01-01 00:00:00.0
08:00:00 00:00:00
+Africa/Windhoek:
+ 1969-12-31 22:00:00.0 1970-01-01 00:00:00.0
22:00:00 00:00:00
retrieved row (String):
- 1969-12-31 16:00:00.000000 1970-01-01 02:00:00.000000+02:00
16:00:00 02:00:00+02:00
-default (Africa/Windhoek):
- 1969-12-31 16:00:00.000+0200 1970-01-01 02:00:00.000+0200
16:00:00.000+0200 02:00:00.000+0200
+ 1969-12-31 16:00:00.000000 1970-01-01 01:00:00.000000+01:00
16:00:00 01:00:00+01:00
+default (UTC):
+ 1969-12-31 16:00:00.000+0000 1970-01-01 00:00:00.000+0000
16:00:00.000+0000 00:00:00.000+0000
America/Los_Angeles:
- 1970-01-01 02:00:00.0 1970-01-01 02:00:00.0
02:00:00 02:00:00
-UTC:
- 1969-12-31 18:00:00.0 1970-01-01 02:00:00.0
18:00:00 02:00:00
+ 1970-01-01 00:00:00.0 1970-01-01 00:00:00.0
00:00:00 00:00:00
+Africa/Windhoek:
+ 1969-12-31 14:00:00.0 1970-01-01 00:00:00.0
14:00:00 00:00:00
retrieved row (String):
- 1970-01-01 02:00:00.000000 1970-01-01 02:00:00.000000+02:00
02:00:00 02:00:00+02:00
-default (Africa/Windhoek):
- 1970-01-01 02:00:00.000+0200 1970-01-01 02:00:00.000+0200
02:00:00.000+0200 02:00:00.000+0200
+ 1970-01-01 00:00:00.000000 1970-01-01 01:00:00.000000+01:00
00:00:00 01:00:00+01:00
+default (UTC):
+ 1970-01-01 00:00:00.000+0000 1970-01-01 00:00:00.000+0000
00:00:00.000+0000 00:00:00.000+0000
America/Los_Angeles:
- 1970-01-01 12:00:00.0 1970-01-01 02:00:00.0
12:00:00 02:00:00
-UTC:
- 1970-01-01 04:00:00.0 1970-01-01 02:00:00.0
04:00:00 02:00:00
+ 1970-01-01 08:00:00.0 1970-01-01 00:00:00.0
08:00:00 00:00:00
+Africa/Windhoek:
+ 1969-12-31 22:00:00.0 1970-01-01 00:00:00.0
22:00:00 00:00:00
+
# 15:09:12 >
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list