Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-22068

DateFormatter.parse does not correctly handle positive GMT offset (such as UK)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK 3.4 (Release)
    • None
    • mx: General
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Create a date string with a positive offset (ex GMT+0100 such as the offset in the UK)
      2. call DateFormatter.parse with the date value
      3. Observe the output

      Actual Results:

      The Date object fullYear return will be 100 (or whatever the positive offset is)

      Expected Results:

      The date object should have the correct year as was in the date string

      Workaround (if any):

      extend DateFormatter and override parse, add the following before calling super.parse:

      var timezoneRegEx:RegExp = /(GMT|UTC)(-|+)\d\d\d\d/ig; // account for both negative and positive offset
      str = str.replace(timezoneRegEx, "");

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: