JiBX
  1. JiBX
  2. JIBX-211

xs:date handling doesn't support timezone information

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JiBX 1.1.5
    • Fix Version/s: JiBX 1.1.6
    • Component/s: core
    • Labels:
      None
    • Environment:
      n/a
    • Number of attachments :
      0

      Description

      Hi,

      The validateDate() function in org.jibx.runtime.Utility is used to
      validate dates in XSD date format. But it doesn't handle date strings with
      timezones, for example "2008-04-08Z", even though the timezone is part of
      the XSD date format specification.

      The biggest problem is that validateDate() doesn't just ignore the
      timezone, but that it considers a date with timezone invalid. This makes
      it unusable with the default axis2 databinding, which apppends a timezone
      to date values.

      Cheers,
      Jochem

        Activity

        Hide
        Dennis Sosnoski added a comment -

        Changed the code to accept the timezone information, but ignore it. That's probably the best approach to take when using Java Date types. Future code may make use of XmlGregorianCalendar or something similar to allow Java representations more directly equivalent to the schema format.

        Show
        Dennis Sosnoski added a comment - Changed the code to accept the timezone information, but ignore it. That's probably the best approach to take when using Java Date types. Future code may make use of XmlGregorianCalendar or something similar to allow Java representations more directly equivalent to the schema format.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Dennis Sosnoski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: