Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
527 Points
458 Posts
Jul 23, 2011 04:12 AM|LINK
currently i am been using following menthod to convert from one time zone to another
TimeZoneInfo cstZone1 = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); TimeZoneInfo cstZone2 = TimeZoneInfo.FindSystemTimeZoneById("UTC"); DateTime cstTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currdatee, cstZone1.Id.ToString(), cstZone2.Id.ToString());
Is there a way that i can pass the offset value diretly to timezoneinfo e.g +05:30 for India instead of passing the name.
bhanu2217
Member
527 Points
458 Posts
Convert timezone based on offset and not name
Jul 23, 2011 04:12 AM|LINK
currently i am been using following menthod to convert from one time zone to another
TimeZoneInfo cstZone1 = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); TimeZoneInfo cstZone2 = TimeZoneInfo.FindSystemTimeZoneById("UTC"); DateTime cstTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(currdatee, cstZone1.Id.ToString(), cstZone2.Id.ToString());Is there a way that i can pass the offset value diretly to timezoneinfo e.g +05:30 for India instead of passing the name.
Visual Studio 2012
Sql Server 2012
-------------------------------------
www.HermesWritings.com