public void SetDefaultTimeZoneTest() { var toSet = new TimeZone("AST"); TimeZone.SetDefault(toSet); var def = TimeZone.GetDefault(); Assert.AreEqual(toSet.Id, def.Id); }
public void GetDefaultTimeZoneTest() { var expected = System.TimeZoneInfo.Local; var result = TimeZone.GetDefault(); var resultWinId = TimeZone.GetWindowsId(result.Id); Assert.Contains(expected.Id, new List <string>() { result.Id, resultWinId }); }