我有一种情况,日期是"3/13/2016 2:41:00 AM".当我按时区转换日期时,我收到错误.
DateTime dt = DateTime.Parse("3/13/2016 2:41:00 AM");
DateTime Date_Time = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(dt, "Eastern Standard Time",
"GMT Standard Time");
Response.Write(dt);
Run Code Online (Sandbox Code Playgroud)
执行后,我收到此错误:
提供的DateTime表示无效时间.例如,当向前调整时钟时,跳过的时间段中的任何时间都是无效的.参数名称:dateTime