[TestMethod]
public void TestMethod1()
{
// Reference : https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).asp
DateTime date1 = DateTime.UtcNow;
Console.WriteLine(date1);
DateTime MyTimeInWesternCentralAmerica = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(date1, "Central America Standard Time");
DateTime MyTimeInWesternEurope = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(date1, "W. Europe Standard Time");
DateTime MyTimeInManila = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(date1, "Singapore Standard Time");
DateTime MyTimeInNorway = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(date1, "Central European Standard Time");
Console.WriteLine("MyTimeInWesternEurope: {0}", MyTimeInWesternEurope);
Console.WriteLine("MyTimeInManila: {0}", MyTimeInManila);
Console.WriteLine("MyTimeInNorway: {0}", MyTimeInNorway);
Console.WriteLine("MyTimeInWesternCentralAmerica : {0}", MyTimeInWesternCentralAmerica);
Assert.IsTrue(true);
}
}
Comments
Post a Comment