Saturday, 2 December 2017

C# Program to get the Universal Time


Code:

using System;
class Program
{
    static void Main()
    {
        TimeZone zone = TimeZone.CurrentTimeZone;
        DateTime univ = zone.ToUniversalTime(DateTime.Now);
        Console.WriteLine("Universal Time is {0}",univ);
        Console.Read();
    }
}


Output:

Universal Time is 10/22/2013 5:23:25 PM



More C# Programs:




















100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...