Hi,
I have requirement where I will get TimeZone Name. According to the time Zone I have to get the GMT of that TimeZone.
I have written code as
String TimeZone_Var = Convert.ToString(Row.TimeZone);
TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(TimeZone_Var);
Row.scheduledstart = TimeZoneInfo.ConvertTimeFromUtc(Row.scheduledstart, timeZoneInfo);
Row.scheduledend = TimeZoneInfo.ConvertTimeFromUtc(Row.scheduledend, timeZoneInfo);
TimeSpan diffdate = Row.scheduledend.Subtract(Row.scheduledstart);
Row.scheduleddurationminutes = Convert.ToInt16(diffdate.TotalMinutes);
Row.Testingtimezone = timeZoneInfo.DisplayName.ToString();
Example ScheduleStart=2012-10-12-14:00:00.000 And ScheduleEnd=2012-10-12 16:00:00.000
I need to get the Time in GMT
Please help me out.
Regards, Kishlay Anand