Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Date Time Conversion based on time zone
//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) { //Your code goes here //DateTime dt=DateTime.Now; DateTime dt= Convert.ToDateTime("2019-06-26 03:45:42.473"); TimeZoneInfo cstZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"); DateTime cstTime = TimeZoneInfo.ConvertTimeFromUtc(dt, cstZone); Console.WriteLine("Pacific Standard Time= "+cstTime); cstZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"); cstTime = TimeZoneInfo.ConvertTimeFromUtc(dt, cstZone); Console.WriteLine("Eastern Standard Time= "+cstTime); cstZone = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); cstTime = TimeZoneInfo.ConvertTimeFromUtc(dt, cstZone); Console.WriteLine("India Standard Time= "+cstTime); Console.WriteLine("---------------------------------------------------------"); foreach (TimeZoneInfo z in TimeZoneInfo.GetSystemTimeZones()) { Console.WriteLine(z.StandardName); } } } }
run
|
edit
|
history
|
help
1
Palindrome String
IEquatable doubt resolved!!
Lambda Expressions Are Cool
Hello world
Trading
Math 10.0 (Added no repeat random numbers)
Numeric to graphical output using string extension method
tokenExchange
makingNum
Fórum ➡ Aggregating 2 compatible dictionaries, using LINQ ♦