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
SADCAX AAAA
Project Euler Problem 7
Program
ArrayList list merge_collections
WithoutPortNo
Testing for Integers and Floats in a String
3. Delegates and events: closure
Using Yield Return to mass copy a Class instance
caleb
Collections demo