How to Specify Source Time Zone When converting between two Time Zones
I’m working with the following Time Zone code: using System.Globalization; DateTime sourceDt = Convert.ToDateTime("2023-09-05T08:00:00"); DateTime sourceUtc = sourceDt.ToUniversalTime(); var tz = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time"); var tzTime = TimeZoneInfo.ConvertTimeFromUtc(sourceUtc, tz); Console.WriteLine("Time1= " + tzTime.ToString("hh:mm tt", CultureInfo.InvariantCulture)); var tz2 = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"); var tz2Time = TimeZoneInfo.ConvertTimeFromUtc(sourceUtc, tz2); Console.WriteLine("Time2= " + tz2Time.ToString("hh:mm tt",CultureInfo.InvariantCulture)); Time1 outputs 07:00 AM… Read More How to Specify Source Time Zone When converting between two Time Zones