The source code to get the local time zone 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 LocalTimeZone = "";
LocalTimeZone = TimeZoneInfo.Local.ToString();
Console.WriteLine("LOCAL TIMEZONE: \n"+LocalTimeZone);
}
}
Output:
LOCAL TIMEZONE:
(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
Press any key to continue . . .
Program:
The source code to get the local time zone is given below. The given program is compiled and executed successfully.
Output: