1. #1
    Sencha User
    Join Date
    Jun 2007
    Posts
    21
    Vote Rating
    0
    Twain is on a distinguished road

      0  

    Question Date columns change based on client GMT

    Date columns change based on client GMT


    Hi all.
    I

  2. #2
    Sencha User
    Join Date
    Jun 2007
    Posts
    21
    Vote Rating
    0
    Twain is on a distinguished road

      0  

    Default


    After some tests I found the cause of this undesirable behaviour (at least by me).
    When I create a date object passing a string by parameter, the constructor routine update the value of the date object based on the time zone of the local computer.

    So if I am running at GMT-0800 and create a date:
    Code:
    var dt = new Date('1/10/2007 03:05:01 GMT-02:00');
    automatically dt will be created with the value:
    Code:
    Tue Jan 09 2007 21:05:01 GMT-0800
    I don

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    1
    devnull is an unknown quantity at this point

      0  

    Default


    dont send the timezone from the server (it may require custom date format on the server and in the reader)

  4. #4
    Sencha User
    Join Date
    Jun 2007
    Posts
    21
    Vote Rating
    0
    Twain is on a distinguished road

      0  

    Default


    Quote Originally Posted by devnull View Post
    dont send the timezone from the server (it may require custom date format on the server and in the reader)
    Thanks devnull for your answer.
    Finally I eliminate all the GMT information from the date fields applying a specific format and it works. Besides, the "auto update" behaviour of the date objects when GMT is passed seems to be weird for me.
    Bye.

  5. #5
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    1
    devnull is an unknown quantity at this point

      0  

    Default


    dates should always be transformed to local dates when possible in most situations, since that is what the timezone info is for
    It would otherwise be quite difficult to add that functionality, and as you have seen it is quite easy to disable it.

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Posts
    4
    Vote Rating
    0
    arslan_mecom is on a distinguished road

      0  

    Default Problem with Timezone

    Problem with Timezone


    Hi,
    I am facing the same problem. Can you guys please share how i can send the date object with timezone from client to server and from server to client. And how can i disable the timezone option in application? Waiting for your reply.

Thread Participants: 2