Radscheduler Timezone conversion with daylight savings

2 posts, 0 answers
  1. Kelly
    Kelly avatar
    18 posts
    Member since:
    May 2014

    Posted 17 Jun 2014 Link to this post


    I am using radscheduler and at one point in the application I have to convert a time which is coming in timezone of -7:00 to EST considering the daylight savings. I am converting using as below:

    string timestr="";
    timestr = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(test.time.Value.ToUniversalTime(), "Eastern Standard Time").ToString("hh:mm:ss");
    I checked IsDayLightSaving(the test.time.value) and its value is true.
    This is giving an additional 1 hour in the timestr variable. e.g. if test.time value is 07:06:47 AM (timezone of -7:00) is passed in above statement then after conversion it becomes 09:06:47 AM which is wrong as the result should come as 08:06:47AM

    Please help me so that i can have the result as 08:06:47AM and don't want to subtract 1 hours based on booleanvalue of IsDaylightSaving method. Is there any other way I can calculate the correct value for daylightsaving time and non daylightsaving time in one go.
  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 19 Jun 2014 Link to this post


    Please find here some similar discussion with a solution about ignoring the daylight saving time without explicitly subtracting 1 hour.

    Boyan Dimitrov

    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