axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Pischky (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-4719) Wrong time when parsing time without time zone information.
Date Thu, 17 May 2012 09:59:09 GMT

    [ 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


Mime
View raw message