Mega Code Archive

 
Categories / C# / Date Time
 

Gets the localized display name for the time zones standard time

using System; public class Example {     public static void Main()     {     }     private void DisplayDateWithTimeZoneName(DateTime date1, TimeZoneInfo timeZone)     {         Console.WriteLine(timeZone.IsDaylightSavingTime(date1) ? timeZone.DaylightName : timeZone.StandardName);     } }