[jboss-jira] [JBoss JIRA] Resolved: (JBXB-143) Invalid marshalling of dateTime Timezone
Darran Lofthouse (JIRA)
jira-events at lists.jboss.org
Thu May 22 12:25:59 EDT 2008
[ http://jira.jboss.com/jira/browse/JBXB-143?page=all ]
Darran Lofthouse resolved JBXB-143.
-----------------------------------
Fix Version/s: (was: JBossXB-2.0.0.CR10)
(was: JBossXB-1.0.0.SP3)
Resolution: Rejected
Not a bug, just the test case fixed by JBXB-142 was a bug.
> Invalid marshalling of dateTime Timezone
> ----------------------------------------
>
> Key: JBXB-143
> URL: http://jira.jboss.com/jira/browse/JBXB-143
> Project: JBoss XML Binding (JBossXB)
> Issue Type: Bug
> Affects Versions: JBossXB-1.0.0.SP2, JBossXB-2.0.0.CR9
> Reporter: Darran Lofthouse
> Assigned To: Darran Lofthouse
>
> The following class: -
> http://anonsvn.jboss.org/repos/common/jbossxb/trunk/src/main/java/org/jboss/xb/binding/SimpleTypeBindings.java
> Converts the timezone to a String as: -
> private static String marshalTimeZone(Calendar value)
> {
> int offset = value.get(Calendar.ZONE_OFFSET) + value.get(Calendar.DST_OFFSET);
> if(offset == 0)
> {
> return "Z";
> }
> DecimalFormat hourFormat = new DecimalFormat("'+'00;-00");
> DecimalFormat minuteFormat = new DecimalFormat("00");
> int minutes = offset / (1000 * 60);
> int hours = minutes / 60;
> minutes -= (hours * 60);
> return hourFormat.format(hours) + ":" + minuteFormat.format(minutes);
> }
> The get methods return a time in milliseconds but the code assumes it is returned in hours.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list