Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • railML 2 railML 2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 50
    • Issues 50
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • railML.orgrailML.org
  • railML 2railML 2
  • Issues
  • #487
Closed
Open
Issue created Mar 20, 2025 by CO Coordination@coordination.COMaintainer

MS .NET does not support "24:00:00" for xs:time or xs:dateTime

The XML Schema standard allows both "00:00:00" and "24:00:00" as lexical representations for midnight. This easiest explanation is given by the XPath documentation:

For xs:time, 00:00:00 and 24:00:00 are alternate lexical forms for the same value, whose canonical representation is 00:00:00. For xs:dateTime, a time component 24:00:00 translates to 00:00:00 of the following day.

Altova and Xerces interpret "24:00:00" correctly, but MS .NET's System.Xml fails with an error. As it is widely used, we should probably avoid using "24:00:00".

With railML 2.5, we introduced the following documentation for the previously undocumented attributes of tTimeSpan, which is only used by IS:uptime:

  • from: The start time for the given mode. When referring to midnight at the beginning of the day, please use "00:00:00".
  • until: The end time for the given mode. When referring to midnight at the end of the day, please use "24:00:00".

This distinction is only in the lexical representation, as xs:time("24:00:00") = xs:time("00:00:00").

Possible solutions

  • Change the recommendation to use "24:00:00" to always use "00:00:00" for midnight.
  • Specify that midnight in from shall always be interpreted as the beginning of the day and midnight in until as the end of the day.
  • Warn that "24:00:00" for any xs:time or xs:dateTime value is not compatible with MS .NET and should be avoided.
Edited Mar 20, 2025 by CO Coordination
Assignee
Assign to
Time tracking

railML.org e.V. (Registry of Associations: VR 5750) Phone: +49 351 47582911 Altplauen 19h; 01187 Dresden; Germany