This is a migrated thread and some comments may be shown as answers.

Radscheduler Timezone conversion with daylight savings

1 Answer 105 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kelly
Top achievements
Rank 1
Kelly asked on 17 Jun 2014, 06:18 AM
Hi,

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.

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 19 Jun 2014, 03:07 PM
Hello,

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

Regards,
Boyan Dimitrov
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.

 
Tags
Scheduler
Asked by
Kelly
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or