Return-Path: X-Original-To: apmail-db-jdo-dev-archive@www.apache.org Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 50D8B1164A for ; Sun, 12 May 2013 17:40:48 +0000 (UTC) Received: (qmail 32783 invoked by uid 500); 12 May 2013 17:14:07 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 32772 invoked by uid 99); 12 May 2013 17:14:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 May 2013 17:14:07 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.238.49.81] (HELO mailgateway.akquinet.de) (213.238.49.81) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 May 2013 17:14:01 +0000 Received: from [172.20.8.32] (port=43842 helo=AKQHPWPEX25.akquinet.de) by mailgateway.akquinet.de with esmtp (Exim 4.76) (envelope-from ) id 1UbZq2-0006Tr-1A for jdo-dev@db.apache.org; Sun, 12 May 2013 19:13:34 +0200 Received: from styx.spree.de (172.20.8.44) by AKQHPWPEX25.akquinet.de (172.20.8.32) with Microsoft SMTP Server (TLS) id 14.3.123.3; Sun, 12 May 2013 19:13:33 +0200 X-CTCH-RefID: str=0001.0A0C0209.518FCDBE.0091,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Message-ID: <518FCDBC.3070309@akquinet.de> Date: Sun, 12 May 2013 19:13:32 +0200 From: Michael Bouschen Organization: akquinet tech@spree GmbH User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Subject: Re: Minutes: JDO TCK Conference Call Friday May 10, 9 am Pacific Daylight Time References: <518C238F.1090103@akquinet.de> <15EA768E-3AD2-4ED2-AA7E-2C35F186313E@oracle.com> In-Reply-To: <15EA768E-3AD2-4ED2-AA7E-2C35F186313E@oracle.com> Content-Type: multipart/mixed; boundary="------------010504010102000002080101" X-Originating-IP: [172.20.8.44] X-Virus-Checked: Checked by ClamAV on apache.org --------------010504010102000002080101 Content-Type: multipart/alternative; boundary="------------050203060600010306080402" --------------050203060600010306080402 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 8bit Hi, > 1. TCK query test failure: possible time zone issue in SupportedDateMethods: https://issues.apache.org/jira/browse/JDO-720 > > AI Michelle try removing the time zone setting and see if that fixes the issue. > attached you find a patch file (TimeZoneChanges.patch) removing the time zone setting. I can successfully run the TCK using the patch file. Regards Michael -- *Michael Bouschen* *Prokurist* akquinet tech@spree GmbH B�lowstr. 66, D-10783 Berlin Fon: +49 30 235 520-33 Fax: +49 30 217 520-12 Email: michael.bouschen@akquinet.de Web: www.akquinet.de akquinet tech@spree GmbH, Berlin Gesch�ftsf�hrung: Martin Weber, Dr. Torsten Fink Amtsgericht Berlin-Charlottenburg HRB 86780 B USt.-Id. Nr.: DE 225 964 680 --------------050203060600010306080402 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit
Hi,
1. TCK query test failure: possible time zone issue in SupportedDateMethods: https://issues.apache.org/jira/browse/JDO-720

AI Michelle try removing the time zone setting and see if that fixes the issue.

attached you find a patch file (TimeZoneChanges.patch) removing the time zone setting. I can successfully run the TCK using the patch file.

Regards Michael

--
Michael Bouschen
Prokurist

akquinet tech@spree GmbH
Bülowstr. 66, D-10783 Berlin

Fon:   +49 30 235 520-33
Fax:   +49 30 217 520-12
Email: michael.bouschen@akquinet.de
Web:   www.akquinet.de

akquinet tech@spree GmbH, Berlin
Geschäftsführung: Martin Weber, Dr. Torsten Fink
Amtsgericht Berlin-Charlottenburg HRB 86780 B
USt.-Id. Nr.: DE 225 964 680
--------------050203060600010306080402-- --------------010504010102000002080101 Content-Type: text/plain; charset="UTF-8"; x-mac-type=0; x-mac-creator=0; name="TimeZoneChange.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="TimeZoneChange.patch" Index: tck/src/java/org/apache/jdo/tck/pc/company/CompanyModelReader.java =================================================================== --- tck/src/java/org/apache/jdo/tck/pc/company/CompanyModelReader.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/pc/company/CompanyModelReader.java (working copy) @@ -94,8 +94,7 @@ */ private void configureFactory() { SimpleDateFormat formatter = new SimpleDateFormat(DATE_PATTERN, Locale.US); - formatter.setTimeZone(TimeZone.getTimeZone("America/New_York")); - CustomDateEditor dateEditor = + CustomDateEditor dateEditor = new CustomDateEditor(formatter, true); registerCustomEditor(Date.class, dateEditor); companyFactory = CompanyFactoryRegistry.getInstance(); @@ -117,7 +116,7 @@ } public static Date stringToUtilDate(String value) { - return ConversionHelper.toUtilDate(DATE_PATTERN, "America/New_York", Locale.US, value); + return ConversionHelper.toUtilDate(DATE_PATTERN, Locale.US, value); } // Convenience methods Index: tck/src/java/org/apache/jdo/tck/pc/companyListWithoutJoin/CompanyModelReader.java =================================================================== --- tck/src/java/org/apache/jdo/tck/pc/companyListWithoutJoin/CompanyModelReader.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/pc/companyListWithoutJoin/CompanyModelReader.java (working copy) @@ -94,8 +94,7 @@ */ private void configureFactory() { SimpleDateFormat formatter = new SimpleDateFormat(DATE_PATTERN, Locale.US); - formatter.setTimeZone(TimeZone.getTimeZone("America/New_York")); - CustomDateEditor dateEditor = + CustomDateEditor dateEditor = new CustomDateEditor(formatter, true); registerCustomEditor(Date.class, dateEditor); companyFactory = CompanyFactoryRegistry.getInstance(); @@ -191,7 +190,7 @@ } public static Date stringToUtilDate(String value) { - return ConversionHelper.toUtilDate(DATE_PATTERN, "America/New_York", Locale.US, value); + return ConversionHelper.toUtilDate(DATE_PATTERN, Locale.US, value); } } Index: tck/src/java/org/apache/jdo/tck/pc/companyMapWithoutJoin/CompanyModelReader.java =================================================================== --- tck/src/java/org/apache/jdo/tck/pc/companyMapWithoutJoin/CompanyModelReader.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/pc/companyMapWithoutJoin/CompanyModelReader.java (working copy) @@ -94,8 +94,7 @@ */ private void configureFactory() { SimpleDateFormat formatter = new SimpleDateFormat(DATE_PATTERN, Locale.US); - formatter.setTimeZone(TimeZone.getTimeZone("America/New_York")); - CustomDateEditor dateEditor = + CustomDateEditor dateEditor = new CustomDateEditor(formatter, true); registerCustomEditor(Date.class, dateEditor); companyFactory = CompanyFactoryRegistry.getInstance(); @@ -191,7 +190,7 @@ } public static Date stringToUtilDate(String value) { - return ConversionHelper.toUtilDate(DATE_PATTERN, "America/New_York", Locale.US, value); + return ConversionHelper.toUtilDate(DATE_PATTERN, Locale.US, value); } } Index: tck/src/java/org/apache/jdo/tck/pc/order/OrderModelReader.java =================================================================== --- tck/src/java/org/apache/jdo/tck/pc/order/OrderModelReader.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/pc/order/OrderModelReader.java (working copy) @@ -94,8 +94,7 @@ private void configureFactory() { SimpleDateFormat formatter = new SimpleDateFormat(DATE_PATTERN, Locale.US); - formatter.setTimeZone(TimeZone.getTimeZone("America/New_York")); - CustomDateEditor dateEditor = + CustomDateEditor dateEditor = new CustomDateEditor(formatter, true); registerCustomEditor(Date.class, dateEditor); orderFactory = OrderFactoryRegistry.getInstance(); @@ -143,8 +142,7 @@ } public static Date stringToUtilDate(String value) { - return ConversionHelper.toUtilDate(DATE_PATTERN, "America/New_York", - Locale.US, value); + return ConversionHelper.toUtilDate(DATE_PATTERN, Locale.US, value); } } Index: tck/src/java/org/apache/jdo/tck/pc/mylib/MylibReader.java =================================================================== --- tck/src/java/org/apache/jdo/tck/pc/mylib/MylibReader.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/pc/mylib/MylibReader.java (working copy) @@ -90,8 +90,7 @@ */ private void configureFactory() { SimpleDateFormat formatter = new SimpleDateFormat(DATE_PATTERN, Locale.US); - formatter.setTimeZone(TimeZone.getTimeZone("America/New_York")); - CustomDateEditor dateEditor = + CustomDateEditor dateEditor = new CustomDateEditor(formatter, true); registerCustomEditor(Date.class, dateEditor); } Index: tck/src/java/org/apache/jdo/tck/query/jdoql/operators/EqualityAndComparisonsBetweenDateFieldsAndParameters.java =================================================================== --- tck/src/java/org/apache/jdo/tck/query/jdoql/operators/EqualityAndComparisonsBetweenDateFieldsAndParameters.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/query/jdoql/operators/EqualityAndComparisonsBetweenDateFieldsAndParameters.java (working copy) @@ -117,8 +117,7 @@ private static final Date FIRST_OF_JAN_1999; static { // initialize static field FIRST_OF_JAN_1999 - Calendar cal = new GregorianCalendar( - TimeZone.getTimeZone("America/New_York")); + Calendar cal = new GregorianCalendar(); cal.set(1999, GregorianCalendar.JANUARY, 1, 0, 0, 0); cal.set(GregorianCalendar.MILLISECOND, 0); FIRST_OF_JAN_1999 = cal.getTime(); Index: tck/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java =================================================================== --- tck/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/query/jdoql/subqueries/NonCorrelatedSubqueries.java (working copy) @@ -111,8 +111,7 @@ "this.weeklyhours> (SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e)"; - Calendar cal = Calendar.getInstance( - TimeZone.getTimeZone("America/New_York"), Locale.US); + Calendar cal = Calendar.getInstance(Locale.US); cal.set(2002, Calendar.SEPTEMBER, 1, 0, 0, 0); Date hired = cal.getTime(); Index: tck/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java =================================================================== --- tck/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/query/jdoql/subqueries/CorrelatedSubqueriesWithParameters.java (working copy) @@ -117,8 +117,7 @@ "(SELECT AVG(e.weeklyhours) FROM " + Employee.class.getName() + " e WHERE e.manager == this.manager)"; - Calendar cal = Calendar.getInstance( - TimeZone.getTimeZone("America/New_York"), Locale.US); + Calendar cal = Calendar.getInstance(Locale.US); cal.set(2002, Calendar.SEPTEMBER, 1, 0, 0, 0); Date hired = cal.getTime(); Index: tck/src/java/org/apache/jdo/tck/util/ConversionHelper.java =================================================================== --- tck/src/java/org/apache/jdo/tck/util/ConversionHelper.java (revision 1481529) +++ tck/src/java/org/apache/jdo/tck/util/ConversionHelper.java (working copy) @@ -56,6 +56,15 @@ } } + public static Date toUtilDate(String pattern, Locale locale, String value) { + SimpleDateFormat formatter = new SimpleDateFormat(pattern, locale); + try { + return formatter.parse(value); + } catch (ParseException e) { + throw new JDOFatalException("", e); + } + } + /** * Converts the given array into a {@link Map}. * The first dimension represents the map entries, --------------010504010102000002080101--