Quartz Scheduler
  1. Quartz Scheduler
  2. QTZ-273

XMLSchedulingDataProcessorPlugin ignores time zones in ISO8601 start/end time

    Details

    • Terracotta Target:
      Quartz 2.1.4
    • Fixed In Revision:
      1981

      Description

      I use the following timestamp to configure simple trigger in XML:

      <start-time>2012-01-01T18:00:00Z</start-time>
      <end-time>2012-01-01T22:00:00+03:00</end-time>

      These are correct ISO8601 dates as required by job_scheduling_data_2_0.xsd schema. However Quartz, while parsing the dates, ignores time zones and uses system default time zone instead of Z (+00:00) and +03:00. This is the time format used by Quartz: XSD_DATE_FORMAT = "yyyy-MM-dd'T'hh:mm:ss". Everything after ss is ignored. Instead the following code can be used:

      javax.xml.bind.DatatypeConverter.parseDateTime(startTimeString).getTime()

      Please find test case and a bug fix included to properly parse all ISO8601 compliant dates.

      1. QTZ-273.patch
        12 kB
        Tomasz Nurkiewicz

        Activity

        Hide
        Tomasz Nurkiewicz added a comment -

        Patch against trunk (3.0.x)

        Show
        Tomasz Nurkiewicz added a comment - Patch against trunk (3.0.x)
        Hide
        Fiona OShea added a comment -

        Tomasz
        Please fill out our Contributor Agreement http://www.terracotta.org/confluence/download/attachments/27918462/Individual+Contributor+Agreement.pdf?version=2
        and send to contributors@lists.terracotta.org to have your patch reviewed and submitted.
        Thanks

        Show
        Fiona OShea added a comment - Tomasz Please fill out our Contributor Agreement http://www.terracotta.org/confluence/download/attachments/27918462/Individual+Contributor+Agreement.pdf?version=2 and send to contributors@lists.terracotta.org to have your patch reviewed and submitted. Thanks
        Hide
        Tomasz Nurkiewicz added a comment -

        Signed Contributor Agreement sent, plese review the patch now.

        Show
        Tomasz Nurkiewicz added a comment - Signed Contributor Agreement sent, plese review the patch now.
        Hide
        Fiona OShea added a comment -

        Signed Contributor agreement received.

        Show
        Fiona OShea added a comment - Signed Contributor agreement received.
        Hide
        Anthony Dahanne Dahanne added a comment -

        issue fixed , applying Tomasz patch (switching from SimpleDateFormat to javax.xml.bind.DatatypeConverter, adding 1 test on triggers definitions with timezone) and adding an additional test with a trigger definition not using a timezone, but the local time (previous behavior)

        Show
        Anthony Dahanne Dahanne added a comment - issue fixed , applying Tomasz patch (switching from SimpleDateFormat to javax.xml.bind.DatatypeConverter, adding 1 test on triggers definitions with timezone) and adding an additional test with a trigger definition not using a timezone, but the local time (previous behavior)

          People

          • Assignee:
            Anthony Dahanne Dahanne
            Reporter:
            Tomasz Nurkiewicz
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: