The source code to get the display name for the current time zone's daylight saving time is given below. The given program is compiled and executed successfully.
using System;
using System.Globalization;
class TimeZoneInfoDemo
{
//Entry point of Program
static public void Main()
{
string dayLightName = "";
TimeZoneInfo localTimeZone;
localTimeZone = TimeZoneInfo.Local;
dayLightName = localTimeZone.DaylightName;
Console.WriteLine("DayLightName of Local Time Zone:\n"+dayLightName);
}
}
Output:
DayLightName of Local Time Zone:
India Daylight Time
Press any key to continue . . .
Program:
The source code to get the display name for the current time zone's daylight saving time is given below. The given program is compiled and executed successfully.
Output: