TimeZoneInfo.Utc Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets a TimeZoneInfo object that represents the Coordinated Universal Time (UTC) zone.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
Public Shared ReadOnly Property Utc As TimeZoneInfo
public static TimeZoneInfo Utc { get; }
Property Value
Type: System..::.TimeZoneInfo
A TimeZoneInfo object that represents the Coordinated Universal Time (UTC) zone.
Remarks
Coordinated Universal Time (UTC) was previously known as Greenwich Mean Time (GMT).
Important 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.
Examples
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.
Dim universalZone As TimeZoneInfo = TimeZoneInfo.Utc
outputBlock.Text &= String.Format("The universal time zone is {0}.", universalZone.DisplayName) & vbCrLf
outputBlock.Text &= String.Format("Its standard name is {0}.", universalZone.StandardName) & vbCrLf
outputBlock.Text &= String.Format("Its daylight savings name is {0}.", universalZone.DaylightName) & vbCrLf
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";
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0
Platforms
Windows Phone