ScopeToTimeZone method
DateTime
ScopeToTimeZone(
- ExchangeServiceBase service,
- DateTime dateTime,
- PropertyBag propertyBag,
- bool isUpdateOperation,
Implementation
DateTime ScopeToTimeZone(
ExchangeServiceBase service,
DateTime dateTime,
PropertyBag propertyBag,
bool isUpdateOperation,
) {
try {
// Plain local DateTimes are C#'s Unspecified kind: they are scoped to the
// service's time zone (the platform's local time zone when none is set).
return service.ConvertDateTimeToUniversalDateTime(dateTime);
} on TimeZoneConversionException catch (e, stacktrace) {
throw PropertyException(
"InvalidDateTime($dateTime)",
Name,
e,
stacktrace,
);
}
}