Q:

C# program to get the Coordinated Universal Time (UTC) zone (TimeZoneInfo.Utc Property)

belongs to collection: C# TimeZoneInfo Class Programs

0

Syntax:

    TimeZoneInfo TimeZoneInfo.Utc

Return value:

It returns the object of TimeZoneInfo class that represents Coordinated universal time(UTC).

 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program:

The source code to get the Coordinated Universal Time (UTC) zone is given below. The given program is compiled and executed successfully.

using System;
using System.Globalization;
using System.Collections.ObjectModel;

class TimeZoneInfoDemo
{
    //Entry point of Program
    static public void Main()
    {
        TimeZoneInfo universalTimeZone;

        universalTimeZone = TimeZoneInfo.Utc;


        Console.WriteLine("The universal time zone: "   +universalTimeZone.DisplayName);
        Console.WriteLine("Daylight savings name: "     +universalTimeZone.DaylightName);
        Console.WriteLine("Standard name: "             +universalTimeZone.StandardName);

    }
}

Output:

The universal time zone: UTC
Daylight savings name: UTC
Standard name: UTC
Press any key to continue . . .

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# TimeZoneInfo Class Programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
C# program to get the system time by Zone Id... >>
<< C# program for TimeZoneInfo.SupportsDaylightSaving...