The source code to get the standard time zone name 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 standardName = "";
TimeZoneInfo localTimeZone;
localTimeZone = TimeZoneInfo.Local;
standardName = localTimeZone.StandardName;
Console.WriteLine("StandardName of Local Time Zone:\n" + standardName);
}
}
Output:
StandardName of Local Time Zone:
India Standard Time
Press any key to continue . . .
Program:
The source code to get the standard time zone name is given below. The given program is compiled and executed successfully.
Output: