Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    timezone problem

    Hi!

    Please check this example:

    Code:
    isc.RestDataSource.create({
      ID:"tesztDS",
      fetchDataURL:"teszt.xml",
      fields:[
        {name:"date", type:"date"}
      ]
    });
    
    isc.DetailViewer.create({
      dataSource:"tesztDS",
      autoFetchData:true
    });
    teszt.xml is:
    Code:
    <response>
      <status>0</status>
      <data>
        <record>
          <date>2010-06-09 23:24:08</date>
        </record>
      </data>
    </response>
    The detailviewer shows the following (formatted via Date.setNormalDisplayFormat):
    2010-06-10 01:24

    This would be correct, as we are in GMT+2 (summer time) now. However, we store our dates in local time, so I want to be able to display what I get from the datasource. I tried to use the following code, but it has absolutely no effect:
    Code:
    isc.Time.addClassProperties({
        UTCHoursOffset:new Date().getTimezoneOffset()/60
    });
    A little help would be appreciated.

    #2
    Hey bakosa,

    any soluation. I have the same problem.

    and:
    Code:
    isc.Time.setDefaultDisplayTimezone("-02:00");
    doesnt work.

    Comment


      #3
      Try to send date in proper ISO 8601 with "T" between date and time and timezone after time. It helped me:

      Code:
      <response>
        <status>0</status>
        <data>
          <record>
            <date>2010-06-09T23:24:08+02:00</date>
          </record>
        </data>
      </response>

      Comment

      Working...
      X