Universal Time is 10/22/2013 5:23:25 PM
This is a C# Program to get the universal time.
This C# Program gets the Universal Time.
Here the universal time is calculated using the timezone function.
Here is source code of the C# Program to get the Universal Time. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
/* * C# Program to get the Universal Time */ 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(); } }
This C# program is used to get the universal time. Here the universal time is calculated using the timezone function. The ToUniversalTime() method recognizes only the current adjustment rule when converting from local time to UTC. As a result, conversions for periods before the current adjustment rule came into effect may not accurately reflect the difference between local time and UTC.
Universal Time is 10/22/2013 5:23:25 PM