C# Program to Get the Standard Time Zone Name (Timezone.standardname Property)

You are currently viewing C# Program to Get the Standard Time Zone Name (Timezone.standardname Property)

C# program to get the standard time zone name (TimeZone.StandardName Property)

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);
    }
}
StandardName of Local Time Zone:
India Standard Time
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply