Currently I have an UTC date which I have to convert to different time zone based on where my client time zone is.
This is the code am currently using:
var timezoneInfo = TimeZoneInfo.FindSystemTimeZoneById(timezone); var clientTime = TimeZoneInfo.ConvertTimeFromUtc(createDateTime, timezoneInfo);
I know this automatically uses the daylight saving time and provide me the current time based on time zone. I have a boolean which determines whether is daylight saving time is enabled or not. The above method doesn't work well based on my boolean value. Is there a inbuilt method or code that converts UTC to different time zone without daylight saving time?