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

DateFormatter bug with negative timezoneOffset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • Adobe Flex SDK 3.0 (Release)
    • None
    • Formatters
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 2.x
      Language Found: English

    Description

      Flex 3 / 3.0.0 / Build 477

      Steps to reproduce:
      1. Run the following code

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="cc()">
      <mx:Script>
      <![CDATA[
      import mx.formatters.DateFormatter;
      private function cc(): void

      { var myDateFormatter: DateFormatter = new DateFormatter(); var myDate: Date = new Date(0); trace(myDate.timezoneOffset); //returns -60 (Due to the fact that I am in Germany) myDateFormatter.formatString = "JJ:NN"; trace(myDateFormatter.format(myDate)); //returns an empty string }

      ]]
      >
      </mx:Script>

      </mx:Application>

      Actual Results:

      DateFormatter returns an empty string

      Expected Results:

      String "00:00"

      Workaround (if any):

      Don't use the time 0 (which probably is 1/1/1970 00:00) when there is a negative timezoneOffset

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: