【问题标题】:Due Date set via EWS is wrong in reminder popup通过 EWS 设置的到期日期在提醒弹出窗口中是错误的
【发布时间】:2011-02-10 10:12:24
【问题描述】:

我在将 EWS 用于任务和提醒(特别是截止日期)时遇到了一些问题。

当我运行我的代码时,如下所示,任务被添加到我的交换帐户中,我可以在 Outlook 中看到它。里面的所有数据看起来也不错。但是,如果我指定对任务进行提醒,它显示的截止日期是非常错误的。

通常是未来 17 小时,但我提供的屏幕截图显示它是未来 19 小时。我觉得很奇怪,如果我打开任务,截止日期看起来不错,但提醒说它应该在未来很长一段时间内到期。有什么想法吗?

截图:http://s970.photobucket.com/albums/ae187/paulehn/?action=view&current=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();

【问题讨论】:

    标签: c# asp.net exchange-server exchangewebservices ews-managed-api


    【解决方案1】:

    看起来这实际上是 Outlook 的一个“功能”,而不是一个错误 -

    http://www.outlook-tips.net/archives/2009/20090623.htm

    【讨论】:

      【解决方案2】:

      您可能应该确保所有日期和时间都在同一个时区。 最好的方法是对所有事物都使用 UTC。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2021-11-17
        • 2021-12-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-12-01
        相关资源
        最近更新 更多