От: | senglory | ||
Дата: | 17.07.21 22:35 | ||
Оценка: |
try
{
return TimeZoneInfo.ConvertTime(dateTime, sourceTimeZone, destinationTimeZone);
}
catch (ArgumentException innerException)
{
throw new TimeZoneConversionException(string.Format("Unable to convert {0} from {1} to {2}.", DateTimeToXSDateTime(dateTime), sourceTimeZone.DisplayName, destinationTimeZone.DisplayName), innerException);
}
Microsoft.Exchange.WebServices.Data.TimeZoneConversionException: Unable to convert 1981-04-01T00:00:00.000 from (UTC+03:00) Москва, стандартное время to (UTC) Coordinated Universal Time.
---> System.ArgumentException: 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. (Parameter 'dateTime')