Unverified 提交 145b71b5 authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #856 from katzyn/tests

Fix TestDateTimeUtils.testDayOfWeek() and example with ANY(?)
......@@ -490,7 +490,7 @@ Instead, use a prepared statement with arrays as in the following example:
</p>
<pre>
PreparedStatement prep = conn.prepareStatement(
"SELECT * TEST.ID = ANY(?)");
"SELECT * FROM TEST WHERE ID = ANY(?)");
prep.setObject(1, new Object[] { "1", "2" });
ResultSet rs = prep.executeQuery();
</pre>
......
......@@ -45,7 +45,7 @@ public class TestDateTimeUtils extends TestBase {
* {@link DateTimeUtils#getIsoDayOfWeek(long)}.
*/
private void testDayOfWeek() {
GregorianCalendar gc = DateTimeUtils.createGregorianCalendar();
GregorianCalendar gc = DateTimeUtils.createGregorianCalendar(DateTimeUtils.UTC);
for (int i = -1_000_000; i <= 1_000_000; i++) {
gc.clear();
gc.setTimeInMillis(i * 86400000L);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论