Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-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 B0190C75D for ; Thu, 17 May 2012 09:59:35 +0000 (UTC) Received: (qmail 35708 invoked by uid 500); 17 May 2012 09:59:34 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 35448 invoked by uid 500); 17 May 2012 09:59:34 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 35426 invoked by uid 99); 17 May 2012 09:59:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 09:59:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 09:59:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CE9C49167 for ; Thu, 17 May 2012 09:59:09 +0000 (UTC) Date: Thu, 17 May 2012 09:59:09 +0000 (UTC) From: "Martin Pischky (JIRA)" To: java-dev@axis.apache.org Message-ID: <1112518153.8119.1337248749847.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (AXIS2-4719) Wrong time when parsing time without time zone information. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-4719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277695#comment-13277695 ] Martin Pischky commented on AXIS2-4719: --------------------------------------- This issue is not fixed. Assume a String of length greater than 19 but without time zone: "2012-05-12T11:22:33.456" => DST_OFFSET will be set to zero. May be you shoud set a flag "haveTimeZone=true" after line // i.e it does not have time zone and use "if(haveTimeZone && source.length() > 19)" instead of "if(source.length() > 19)" > Wrong time when parsing time without time zone information. > ----------------------------------------------------------- > > Key: AXIS2-4719 > URL: https://issues.apache.org/jira/browse/AXIS2-4719 > Project: Axis2 > Issue Type: Bug > Components: adb > Environment: All > Reporter: Rikard Swahn > Labels: daylight, local, savings, time, timezone, zone > Fix For: 1.6.0 > > Original Estimate: 2h > Remaining Estimate: 2h > > Functions public static Date convertToDate(String source) and public static Calendar convertToDateTime(String source) returns wrong time when parsing a data without timezone information. > When parsing a time without timezone set, default timezone is used, But, daylight saving is always set to zero (instead of using the local default daylight savings also). This gives the wrong time back when the local daylight savings is not zero. > The fix is to only set daylight savings to zero ( calendar.set(Calendar.DST_OFFSET, 0); ) when the time has time zone information. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org