Turn off automatic daylight savings detection

6 posts, 0 answers
  1. Kevin
    Kevin avatar
    22 posts
    Member since:
    Feb 2014

    Posted 20 Oct 2014 Link to this post

    Hi,

    I noticed when running some tests based on Daylight Savings, that any attempt to select a time during the Spring transition results in the time being set back an hour. (To see this behaviour, attempt to enter 2:30 AM on March 8, 2015).  However there are many places that do not recognize Daylight Savings even in time zones that generally do, so I was wondering if there was a way to disable this feature?

    Thanks,
    Kevin
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 22 Oct 2014 Link to this post

    Hi,

    Basically the Date/Time pickers internally works with JavaScript Date object - that why when you try to create such date the browser automatically adjusts it if the given hour is not available due to DST changes in current timezone. In case you need to use the DateTimePicker for selecting such dates I would suggest to use two different widgets instead - one DatePicker for selecting the date and one TimePicker for selecting the time. This way the dates will not be adjusted by the browser as the TimePicker date part will be different date.

    Also please not that currently the TimePicker doesn't support setting explicitly the date part of the Date object used for creating the dates, however this feature is already in our dev team queue (for updates on the matter you can regularly check our RoadMap).


    Regards,
    Vladimir Iliev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Kevin
    Kevin avatar
    22 posts
    Member since:
    Feb 2014

    Posted 10 Mar 2015 in reply to Vladimir Iliev Link to this post

    Hello,

    This has come up again because of the recent daylight savings switch.  Is there a solution I can implement in a more immediate fashion?  We have a scheduling tool that crosses multiple time zones and regions including many that don't recognize daylight savings.  Is there a way to specify a timezone for the javascript date object to use (ie always have it set to GMT)?

    Thanks,
    Kevin
  5. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 12 Mar 2015 Link to this post

    Hello Kevin,

    I'm little confused to the last answer - as I already mention in order to make all users view the same events and not being affected by the DST than you should set the timezone option of the Scheduler to "Etc/UTC". Also the server side should accept and send only UTC dates.

    Regards,
    Vladimir Iliev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Kevin
    Kevin avatar
    22 posts
    Member since:
    Feb 2014

    Posted 12 Mar 2015 Link to this post

    Hi Vladimir,

    Sorry to be unclear, my issue remains with the DateTimePicker (and TimePicker on the day of the spring daylight transition period) not allowing me to select any times between 2 and 3 am.  It automatically adds an additional hour based on the user's local settings.  I understand this is a behaviour of the Javascript Date object and I'm wondering if there is a way to use the control to set the offset of the javascript date to UTC (maybe provide an offset numeric value?), without having our users change their local settings.  Hopefully that's more clear.

    Thanks,
    Kevin
  7. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 16 Mar 2015 Link to this post

    Hello Kevin,

    This behavior is related to that the Date/Time pickers doesn't support timezones like the Scheduler and use JavaScript Date object internally (the dates in JavaScript are always created using local timezone). Currently there is no easier solution for selecting hours in which there is DST change in local timezone than using regular input element as editor. 

    Also I would suggest to share your idea about supporting DST dates at Kendo UI UserVoice to allow other users vote for it. Most voted ideas are included in next Kendo UI releases. 

    Regards,
    Vladimir Iliev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready