2 Replies Latest reply on Oct 20, 2008 6:26 AM by paulo.larini

    Datachooser mystery

    paulo.larini
      In the change event of a datachooser component I put the following code:
      var sd:String = dateExFormatter.format(calendario.selectedDate);
      Alert.show(sd);
      ..
      <mx:DateFormatter id="dateExFormatter" formatString="YYYY-MM-DD"/>

      but, when I select 2008-10-19 it displays: 2008-10-18!
      other days seams to be ok.

      Looks like locale problem, but i'm lost.




        • 1. Re: Datachooser mystery
          paulo.larini Level 1
          He is the debug of selectedDate:

          calendario.selectedDate = Date (@a7becc41)
          date = 18 [0x12]
          dateUTC = 19 [0x13]
          day = 6
          dayUTC = 0
          fullYear = 2008 [0x7d8]
          fullYearUTC = 2008 [0x7d8]
          hours = 23 [0x17]
          hoursUTC = 2
          milliseconds = 0
          millisecondsUTC = 0
          minutes = 0
          minutesUTC = 0
          month = 9
          monthUTC = 9
          seconds = 0
          secondsUTC = 0
          time = 1224381600000 [0x11d12d49100]
          timezoneOffset = 180 [0xb4]
          • 2. Datachooser mystery
            paulo.larini Level 1
            This is happen in a linux ubuntu machine.

            And the problem is about day light saving settings.

            in windows I have the same behavior if day light saving is turned on..