Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Get UTC time and offset minutes
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { TimeZone zone = TimeZone.CurrentTimeZone; Console.WriteLine(zone.StandardName); // Demonstrate ToLocalTime and ToUniversalTime. DateTime local = zone.ToLocalTime(DateTime.Now); DateTime universal = zone.ToUniversalTime(DateTime.Now); Console.WriteLine(local); Console.WriteLine(universal); // Get offset. TimeSpan offset = zone.GetUtcOffset(DateTime.Now); Console.WriteLine(offset); } } }
run
|
edit
|
history
|
help
0
Median in two sorted lists (O(m*n))
Namespace addition
D18
Xml in C#
Non-User input - Random Controlled - Guessing Game
Test
Date Diff
CubexSoft
WallPascal
Sum Matrix Row