A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/api/system.timezoneinfo.utc below:

TimeZoneInfo.Utc Property (System) | Microsoft Learn

TimeZoneInfo.Utc Property Definition

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

public:
 static property TimeZoneInfo ^ Utc { TimeZoneInfo ^ get(); };
public static TimeZoneInfo Utc { get; }
static member Utc : TimeZoneInfo
Public Shared ReadOnly Property Utc As TimeZoneInfo
Property Value

An object that represents the Coordinated Universal Time (UTC) zone.

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.

TimeZoneInfo universalZone = TimeZoneInfo.Utc;
Console.WriteLine("The universal time zone is {0}.", universalZone.DisplayName);
Console.WriteLine("Its standard name is {0}.", universalZone.StandardName);
Console.WriteLine("Its daylight savings name is {0}.", universalZone.DaylightName);
let universalZone = TimeZoneInfo.Utc
printfn $"The universal time zone is {universalZone.DisplayName}."
printfn $"Its standard name is {universalZone.StandardName}."
printfn $"Its daylight savings name is {universalZone.DaylightName}."
Dim universalZone As TimeZoneInfo = TimeZoneInfo.Utc
Console.WriteLine("The universal time zone is {0}.", universalZone.DisplayName)
Console.WriteLine("Its standard name is {0}.", universalZone.StandardName)
Console.WriteLine("Its daylight savings name is {0}.", universalZone.DaylightName)
Remarks

This is a built-in object; information about this TimeZoneInfo object is not retrieved from the registry on Windows systems and from the ICU Library on Linux and macOS.

Important

You should always access the Coordinated Universal Time (UTC) zone through the TimeZoneInfo.Utc property rather than assigning the UTC time zone to a TimeZoneInfo object variable. This prevents the TimeZoneInfo object variable from being invalidated by a call to the ClearCachedData method.

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

See also

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4