Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
UTC to Ireland time convertion v1.1
//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) { DateTime thisTime = Convert.ToDateTime("2019-04-01"); //TimeZoneInfo tst = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time"); TimeZoneInfo tst = TimeZoneInfo.FindSystemTimeZoneById("Greenland Standard Time"); //TimeZoneInfo tst = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); DateTime tstTime = TimeZoneInfo.ConvertTime(thisTime, TimeZoneInfo.Utc, tst); Console.WriteLine("{0} [UTC Time]", TimeZoneInfo.ConvertTimeToUtc(tstTime, tst)); Console.WriteLine("{0} [Time in \"{1}\" zone]", tstTime, tst.IsDaylightSavingTime(tstTime) ? tst.DaylightName : tst.StandardName); Console.WriteLine("Is this zone having DST: {0}", tst.GetAdjustmentRules().Count()>0); if(tst.GetAdjustmentRules().Count() > 0){ Console.WriteLine("Is this zone in daylight saving for given time: {0}", tst.IsDaylightSavingTime(tstTime).ToString()); Console.WriteLine("\n"); foreach(var dl in tst.GetAdjustmentRules()){ Console.WriteLine("Daylight different: {0}, (Starts:{1}, Ends:{2})",dl.DaylightDelta, dl.DateStart, dl.DateEnd); } } } } }
run
|
edit
|
history
|
help
1
30272 Example1
constructortest
Generics
GetChange
program
Sum of numbers in string
Math 9.5
Palindrome Number
2
Quicksort