TimeZoneInfo.DisplayName Property

July 28, 2014

Gets the localized general display name that represents the time zone.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public string DisplayName { get; }

Property Value

Type: System.String
The time zone's localized general display name.

Version Notes

XNA Framework

 When this property is used in the XNA Framework, it throws a NotSupportedException exception.

The following example retrieves a TimeZoneInfo object that represents the local time zone and outputs its display name, standard time name, and daylight saving time name.


TimeZoneInfo localZone = TimeZoneInfo.Local;
outputBlock.Text += "Local Time Zone ID:" + "\n";
outputBlock.Text += String.Format("   Display Name is: {0}.", localZone.DisplayName) + "\n";
outputBlock.Text += String.Format("   Standard name is: {0}.", localZone.StandardName) + "\n";
outputBlock.Text += String.Format("   Daylight saving name is: {0}.", localZone.DaylightName) + "\n";


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft