Due Date set via EWS is wrong in reminder popup
        Posted  
        
            by Paul McLean
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Paul McLean
        
        
        
        Published on 2010-04-21T03:12:13Z
        Indexed on 
            2010/04/21
            3:13 UTC
        
        
        Read the original article
        Hit count: 495
        
I'm having some trouble using EWS with tasks and reminders, specifically, the due date.
When I run my code, shown below, the task is added to my exchange account and I can see it fine in outlook. All the data in it looks fine too. However, if I specify to have a reminder for the task, the due date it shows is very wrong.
It's usually 17 hours in the future, but the screenshot I've provided shows it being 19 hours in the future. I'm finding it very strange that if I open the task, the due date looks fine, but the reminder is saying it is due well into the future. Any ideas?
Screenshot: http://s970.photobucket.com/albums/ae187/paulehn/?action=view¤t=ewstask.jpg
ExchangeVersion exchVersion = new ExchangeVersion();
exchVersion = ExchangeVersion.Exchange2007_SP1;
ExchangeService service = new ExchangeService(exchVersion);
service.UseDefaultCredentials = true;
service.Url = new Uri("https://mail.domain.com.au/ews/exchange.asmx");
Task task = new Task(service);
task.Subject = "Subject";
task.Body = new MessageBody(BodyType.HTML, "Body");
task.StartDate = DateTime.Today;
task.DueDate = DateTime.Now.AddHours(2);
task.ReminderDueBy = DateTime.Now;
task.ReminderMinutesBeforeStart = 15;
task.IsReminderSet = true;
task.Save();
        © Stack Overflow or respective owner