0 Replies Latest reply on Oct 19, 2010 6:54 AM by pk1023

    Chart changes timestamps without permission

    pk1023

      Hey everyone,

       

      If you look at the chart at: http://www.midwestmarket.org/page/Day-Ahead+Wind+Forecast

       

      You'll see a chart with 2 lines that depict wind generation in the Midwest over the current 24 hours.

       

      This is a Flex chart built in Flash Bldr 4. The backing data is at: http://www.midwestiso.org/misoRIA/servlet/windForecastDayAheadResponseServlet

       

      the data looks like this:

       

      - <WindForecastDayAhead>
      - <Forecast>
      <TimestampGMT>1287464400000</TimestampGMT>
      <DateTimeEST>10/19/2010 12:00 AM</DateTimeEST>
      <HourEndingEST>01</HourEndingEST>
      <Value>789.776048</Value>
      </Forecast>

      This is the code I use to determine the Axis line for the hours:

       

              <mx:series>
                  <mx:LineSeries
                      id="RealTimeGeneration"
                      displayName="Real Time Generation (MWh)"
                      dataProvider="{myData}"
                      yField="Value"     
                      xField="TimestampGMT"               
                      lineStroke="{s1}"/>
                  <mx:LineSeries
                      id="DayAheadForecast"
                      displayName="Day Ahead Forecast (MWh)"
                      form="step"
                      dataProvider="{myData2}"
                      yField="Value"      
                      xField="TimestampGMT"
                      lineStroke="{s2}"/>           
              </mx:series>

       

       

      The problem is that I want the Axis to ALWAYS be in EST on EVERY browser, regardless of the time on the local computer it's running on.

       

      Right now it takes the GMT timestamp and converts it the local timezone of the computer it's running on.

       

      This causes the Tool Tip and the Axis is show different stamps because the Tool Tip Function:

       

              private function lcDataTipFunction(hitData:HitData):String
              {
                  var s:String;
                      var curVal:Number = hitData.item.HourEndingEST.valueOf();
                      s = LineSeries(hitData.element).displayName + " - Hour Ending: <b>" +  curVal + "</b> Value: <b> " + hitData.item.Value +"</b>";
                  return s;
              }

       

      Does not change the timestamp.

       

       

      How do I force the timestamp to ALWAYS show EST values? Do I need to send the TimeStampGMT in EST values as well?