[
https://issues.apache.org/jira/browse/XERCESJ-1418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Glavassevich resolved XERCESJ-1418.
-------------------------------------------
Resolution: Fixed
This was fixed in January 2009 (see SVN rev 735389) and returns 24 from
getHour() [1] as required by the JAXP specification.
Since it seems like you're interested in donating fixes to Xerces, a few
pointers about contributing to the project:
- Fixes are more consumable by developers in the form of patches. A context
diff produced by ("diff -u") is preferred.
IDEs such as Eclipse have this feature built-in.
- You should try to produce a patch from the latest source code. Xerces 2.9.1
may be the currently available release,
but it's over 2 years old to developers. We've made lots of changes since
then and it would have saved you some
time on this issue given that the fix was already in SVN.
- For most contributions to Xerces a Contributor License Agreement (CLA) [1] is
required. Faxing a signed copy
of this agreement to Apache will allow us to accept your code into the
project.
[1]
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/datatype/XMLGregorianCalendar.html#datetimefield-hour
[2] http://xerces.apache.org/charter.html#CONTRIBUTORS
> XMLGregorianCalendarImpl should parse "24:00:00"
> ------------------------------------------------
>
> Key: XERCESJ-1418
> URL: https://issues.apache.org/jira/browse/XERCESJ-1418
> Project: Xerces2-J
> Issue Type: Bug
> Components: JAXP (javax.xml.datatype)
> Affects Versions: 2.9.1
> Environment: any
> Reporter: Michele Vivoda
> Fix For: 2.10.0
>
> Attachments: TestTime24.java, XMLGregorianCalendarImpl.java
>
>
> The lexical value of a xs:dateTime and a xs:time allow the
> time to be in the form "(24:00:00(\.0+)?)". In short if it is
> a xs:dateTime that lexical represents "00:00:00" of the day after
> while if is a xs:time it is the same as "00:00:00"
> References:
> http://www.w3.org/TR/xmlschema-2/#dateTime
> http://www.w3.org/TR/xmlschema11-2/#rf-lexicalMappings-datetime
> http://www.w3.org/TR/xpath-functions/#date-time-values
> Xerces reports "24:00:00" as unparsable,
> internal.xerces (java4 & java6) parses it but then
> the hour field is 24, that should not be correct.
> Probably related to
> https://issues.apache.org/jira/browse/XERCESJ-683
> http://marc.info/?l=xerces-cvs&m=105578736117117&w=2
> The fix I propose is for XMLGregorianCalendarImpl.Parser#parse(), the flow is:
> -in parsing loop:
> - possibly retain y,m,d to set them at the end
> - possibly check if 24h is present, in case set flag and use 0 as hour.
> -at the end of loop:
> - if 24h flag is set, check min,sec are zero
> - if has date
> - Add one day if 24h flag set
> - set date components
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]