Export (0) Print
Expand All

TimeZoneInfo.Utc Property

Gets a TimeZoneInfo object that represents the Coordinated Universal Time (UTC) zone.

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

public static TimeZoneInfo Utc { get; }

Property Value

Type: System.TimeZoneInfo
A TimeZoneInfo object that represents the Coordinated Universal Time (UTC) zone.

Coordinated Universal Time (UTC) was previously known as Greenwich Mean Time (GMT).

Important noteImportant Note:

You should access the Coordinated Universal Time zone through the TimeZoneInfo.Utc property rather than assigning the UTC time zone to a TimeZoneInfo object variable.

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 Coordinated Universal Time (UTC) and outputs its display name, standard time name, and daylight saving time name.


TimeZoneInfo universalZone = TimeZoneInfo.Utc;
outputBlock.Text += String.Format("The universal time zone is {0}.", universalZone.DisplayName) + "\n";
outputBlock.Text += String.Format("Its standard name is {0}.", universalZone.StandardName) + "\n";
outputBlock.Text += String.Format("Its daylight savings name is {0}.", universalZone.DaylightName) + "\n";


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft