Q:

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

belongs to collection: C# TimeZoneInfo Class Programs

0

Syntax:

    string TimeZoneInfo.StandardName

Return value:

It returns a string value that denotes the standard name of the local time zone.

 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program:

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 . . .

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# TimeZoneInfo Class Programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
C# program for TimeZoneInfo.SupportsDaylightSaving... >>
<< C# program for TimeZoneInfo.Id property & TimeZone...