2 Replies Latest reply on Jul 2, 2009 2:54 AM by home_aidan

    Using new Date on Linux is diffrent to windows/mac????

    home_aidan Level 1


      Im getting two diffrent results when using date when using either windows / linux


      The windows output should be      Wed Jul 1 16:15:12 GMT+0100 2009


      When i run this code on linux I get  Wed Jul 1 16:15:12 GMT-0400 2009


      Does anyone know why this is and how i can correct it so its the same as windows?

      Example working as below....






      Thanks for any help.








      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="figureTimeDif('2009-07-01 16:15:12');">



        [Bindable]public var betplacedtimedate:Date



      public function figureTimeDif(betsliptaken:String):void{

      var thedate:String = betsliptaken;

      var dateBit:String = thedate.split(" ")[0]

      var timeBit:String = thedate.split(" ")[1]

      var dateBits:Array = dateBit.split("-");

      var timeBits:Array = timeBit.split(":");

      betplacedtimedate = new Date( dateBits[0], dateBits[1]-1, dateBits[2],timeBits[0],timeBits[1],timeBits[2])






      <mx:Text  htmlText="==============================================================================" />

      <mx:Text  htmlText="{betplacedtimedate}"/>