ScopeToTimeZone method

DateTime ScopeToTimeZone(
  1. ExchangeServiceBase service,
  2. DateTime dateTime,
  3. PropertyBag propertyBag,
  4. bool isUpdateOperation,
)
Scopes the date time property to the appropriate time zone, if necessary. The service emitting the request. The date time. The property bag. Indicates whether the scoping is to be performed in the context of an update operation.

Implementation

DateTime ScopeToTimeZone(ExchangeServiceBase service, DateTime dateTime,
    PropertyBag propertyBag, bool isUpdateOperation) {
  // todo : unsafe ScopeToTimeZone
  print("!!! using unsafe ScopeToTimeZone");
  return dateTime;
//            try
//            {
//                DateTime convertedDateTime = EwsUtilities.ConvertTime(
//                    dateTime,
//                    service.TimeZone,
//                    TimeZoneInfo.Utc);
//
//                return new DateTime(convertedDateTime.Ticks, DateTimeKind.Utc);
//            }
//            catch (TimeZoneConversionException e)
//            {
//                throw new PropertyException(
//                    string.Format(Strings.InvalidDateTime, dateTime),
//                    this.Name,
//                    e);
//            }
}