public static void Main()
String aLocalATLTime = "2021-07-14T13:59:01";
DateTime dateTime = DateTime.ParseExact(aLocalATLTime, "yyyy-MM-ddTHH:mm:ss",
System.Globalization.CultureInfo.InvariantCulture);
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById("US Eastern Standard Time");
TimeSpan offset = tzi.GetUtcOffset(dateTime);
Console.WriteLine(offset);
Console.WriteLine(aLocalATLTime + offset.ToString().Substring(0, 3));
Console.WriteLine("Call function " + addZoneToLocalTime(aLocalATLTime, "US Eastern Standard Time"));
public static String addZoneToLocalTime (string localTimeNoZone, string zoneName){
DateTime dateTime = DateTime.ParseExact(localTimeNoZone, "yyyy-MM-ddTHH:mm:ss",
System.Globalization.CultureInfo.InvariantCulture);
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById(zoneName);
TimeSpan offset = tzi.GetUtcOffset(dateTime);
return localTimeNoZone + offset.ToString().Substring(0, 3);