Problem with Timezone

2 posts, 0 answers
  1. Matt Dufrasne
    Matt Dufrasne avatar
    23 posts
    Member since:
    Aug 2009

    Posted 09 Oct 2013 Link to this post

    Using 2013.9.18

    I'm defining a kendoScheduler with 
    timezone: "Etc/UTC"
    It works great, in my database the times are stored in UTC and depending on whether I load the page in San Francisco (GMT+7) or Minneapolis (GMT+5), the same event shows two different starting times depending on the user's geographical location. The kendoScheduler seems to convert the dates to local time and this is great for me. (The documentation indicates it should do the opposite, but this is the effect I wanted so for now I'm happy).

    The problem is that it computes local time wrong. In Minneapolis, it takes GMT and adds 5 and in San Francisco, it takes GMT and adds 7. It should be subtracting these values, not adding them! If it's 00:00 GMT, it's 17:00 the previous day in San Francisco, not 07:00.

    Has anyone else had the same sort of issues? Searching the forums, it seems like I'm not the only one encountering this.

  2. Matt Johnson
    Matt Johnson avatar
    2 posts
    Member since:
    May 2012

    Posted 09 Oct 2013 Link to this post

    You should not be using zones like "Etc/GMT+5" or "Etc/GMT+7".  Instead, you should be using zones like "America/Chicago" or "America/Los_Angeles".

    Kendo uses the IANA time zone database.  The GMT zones in that database have their sign inverted intentionally.  They are only there for backwards compatibility with POSIX time zones.  They are completely unnecessary for JavaScript.

    You can read more in the comments in the timezone database itself.
Back to Top