当我以这个特定的dt值运行代码时,调用ConvertTimeToUtc方法时会抛出异常。我的本地机器时区ID是“GMT标准时间”。
异常情况是:
var tzi = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time");
var dt = new DateTime(1995, 4, 2, 2, 55, 0);
var t = TimeZoneInfo.ConvertTimeToUtc(dt, tzi);
异常情况是:
System.ArgumentException was unhandled
Message="The supplied DateTime represents an invalid time. For example, when the clock is adjusted forward, any time in the period that is skipped is invalid.\r\nParameter