Details

    • Type: Bug
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.4.37
    • Fix Version/s: 5.2.6.11
    • Labels:
    • Sprint:
      January 2018 Sprint

      Description

      Lucee currently does not support using the 'X' portion of the mask inside of the DateTimeFormat function. When trying to create a date such as

      2017-10-30T12:13:04-05:00
      

      which is 'ThreeLetterISO8601TimeZone' according to the SimpleDateFormat Java docs https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#iso8601timezone

      The following works in Coldfusion 2016:

      writedump(dateTimeFormat(now(), "yyyy-MM-dd'T'HH:mm:ssXXX", "America/Chicago"));
      

      which at the time of running it produced:

      2017-10-30T12:10:21-05:00
      

      But in the latest versions of Lucee produces:

      2017-10-30T12:10:53XXX
      

      As a workaround currently the only way to get the desired output to work in Lucee is to use this:

      dump(createObject("java", "java.text.SimpleDateFormat").init("yyyy-MM-dd'T'HH:mm:ssXXX").format(now()))
      

      For clarity using:

      dateTimeFormat(now(), "ISO8601")
      

      does not produce the desired result because the time zone portion does not contain a colon. Please see the comment thread below.

        Attachments

          Activity

            People

            • Assignee:
              21solutions Igal Sapir
              Reporter:
              brandon.brown Brandon Brown
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: