【问题标题】:Send a Meeting Request with System.Net.Mail使用 System.Net.Mail 发送会议请求
【发布时间】:2012-07-09 13:50:47
【问题描述】:

我正在使用this example code 发送会议请求。我有一个问题:每次我使用代码时,会议时间总是错误的时间。

例如:DTSTART:20120710T143000Z 在 Outlook 中提供约会Tuesday, July 10, 2012 4:30 PM-5:30 PM,而它应该提供Tuesday, July 10, 2012 2:30 PM-3:30 PM。为什么会这样?

我们的当地时间在夏季是 UTC/GMT +3(约旦标准时间),在冬季是 UTC/GMT +2。每次我通过 Outlook 进行预约时,总是合适的时间。

【问题讨论】:

  • @JohnSaunders 是吗? 14h 30m 00s?

标签: asp.net outlook timezone


【解决方案1】:

您预约的开始时间应该是 UTC 时间。我怀疑您是插入当地(约旦)时间。这解释了两个小时的差异,因为 afaik UTC 不考虑夏令时。

SO 资源:

  1. Convert somebody's local time to the UTC time
  2. Daylight saving time and time zone best practices
  3. Convert UTC/GMT time to local time

【讨论】:

  • 感谢我尝试这些资源,看看是否对我有用,然后回复你。
  • 我使用了 ToUniversalTime() 函数将时间转换为 UTC 并且成功了。谢谢。
  • 太好了。考虑接受这个答案,这样每个人都知道你的问题已经解决了。
猜你喜欢
  • 1970-01-01
  • 2011-06-16
  • 1970-01-01
  • 2019-03-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多