This topic has not yet been rated - Rate this topic

TimeZoneInfo.StandardName Property

April 12, 2014

Gets the localized display name for the time zone's standard time.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)
public string StandardName { get; }

Property Value

Type: System.String
The localized display name of the time zone's standard time.

Version Notes

XNA Framework

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

The following example defines a method named DisplayDateWithTimeZoneName that uses the IsDaylightSavingTime(DateTime) method to determine whether to display a time zone's standard time name or daylight saving time name.


private void DisplayDateWithTimeZoneName(System.Windows.Controls.TextBlock outputBlock, 
                                         DateTime date1, TimeZoneInfo timeZone)
{
   outputBlock.Text += String.Format("The time is {0:t} on {0:d} {1}",
                     date1,
                     timeZone.IsDaylightSavingTime(date1) ?
                         timeZone.DaylightName : timeZone.StandardName) + "\n";
}


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.