Scheduler and Timezones

4 posts, 0 answers
  1. akcinga
    akcinga avatar
    1 posts
    Member since:
    Aug 2007

    Posted 17 Aug 2014 Link to this post

    I've spent more than three days attempting to decode the magic of timecode handling in the Kendo Scheduler.  Can someone help?
    I want to allow users to enter start/end times in their local time (which can be any US timezone).  And I need the LOCAL times, AS ENTERED, to be saved to the database.  The server is in a different timezone from any of my clients.  I have client orgs in multiple timezones, and any given org's users all expect to work in the same timezone.  
    This should be simple -- I simply want the scheduler to IGNORE timezones altogether and store and serve back whatever times are entered by the user, regardless of their client timezone.

    Thanks in advance!
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 19 Aug 2014 Link to this post

    Hi akcinga,

    The Scheduler has a timezone option, which is used to tell the widget in what timezone the scheduler events are created and stored on the server. If the timezone is not set the scheduler will use the current timezone. This means that users with different timezone settings will see different start and end times. Setting the timezone of the scheduler would make it display the same start and end times regardless of the current user timezone.
    Based on the given information, I believe that you can set the widget timezone to "Etc/UTC" and persist the dates on the server in UTC. Thus you will be able to display events regardless of the client timezone. This online demo uses exactly this approach. You can also check this help article, which depicts specific steps how to bind to a remote service.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Jeff
    Jeff avatar
    8 posts
    Member since:
    Aug 2012

    Posted 25 Aug 2014 in reply to Georgi Krustev Link to this post

    I don't think the online demo does this.

    If my local time zone is America/New_York, and I enter an event at 12:00 PM, specifying America/New_York in the event dialog, then the online demo as-of 2014-08-25, draws the event at 4PM, and when you open it up, the start time is 12:00PM.  What I need is for it to draw the event at 12:00PM as entered, and just use UTC for storage, and use the given time zone to translate from UTC and display on the grid.

    Anyone know how to do this?
  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 27 Aug 2014 Link to this post

    Hello Jeff,

    I answered to the support thread opened on the subject. I will ask you to continue our discussion there to avoid any duplication. Thank you for your understanding.

    As to the question, when multiple timezones needs to be supported, then you will need to define the timezone option of the widget. Thus Scheduler will know how to handle events with specific start/end timezone values. The online demo I referenced in my last reply defines "Etc/UTC" timezone and dates on the server are persisted in the same timezone. Thus users from different timezones will see the events in the same time slots, because Scheduler will honor local timezone and will adjust the dates.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top