如何为Exchange Web服务(不管理XML)指定EDT(夏令时)? [英] How to specify EDT (daylight saving time) to Exchange Web Services (XML not managed)?

查看:63
本文介绍了如何为Exchange Web服务(不管理XML)指定EDT(夏令时)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处的文章:

http://msdn. microsoft.com/en-us/library/exchange/bb738399(v=exchg.80).aspx

在为TimeZoneNames使用注册表项名称"部分中,告诉我,当我可以在Exchange中创建日历项目时,可以为其传递时区名称.这是可以解决的问题,但是如何命名东部夏令时间"?

in the section "Use Registry Key Names for TimeZoneNames", tells me that when I can create a calendar item in Exchange, I can pass it the name of a timezone. This is sort-of working, but how do I name "Eastern Daylight Time"?

仅接受美国东部标准时间"有效.在工作中,我安排了诸如14:00的时间,当它显示在我的Google日历中时,我看到它显示在美国东部时间15:00,因此它使用了我传入的EST时区.问题是它发出了提醒电子邮件在美国东部标准时间"中显示的时间.

Only 'US Eastern Standard Time' is accepted as valid. In works in that I schedule something for say 14:00, when it displays in my Google calendar I see it is displaying at 15:00 EDT, so it used the EST timezone I passed in. Problem is that it sends out reminder emails with the time displayed in "US Eastern Standard Time".

When: Friday, August 30, 2013 2:00 PM-3:00 PM. US Eastern Standard Time
... rest of email ...

我不要那样的文字.它应该显示美国东部夏令时"或类似名称.

I don't want that text like that. It should say "US Eastern Daylight Time" or something like that.

soap请求包含如下XML:

The soap request contains XML like:

<t:CalendarItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types">  
    ...
    <Start>2013-08-30T14:00:00</Start>     
    <t:MeetingTimeZone TimeZoneName="US Eastern Standard Time"></t:MeetingTimeZone>
<t:CalendarItem>

这是Exchange Server 2007 SP1.

This is Exchange Server 2007, SP1.

这是Gmail中电子邮件外观的图像. (时间与我上面的示例有些不同,抱歉).约会时间是正确的,但是在电子邮件正文中将其称为东部标准时间",这是不对的-它应该是东部夏令时间"或类似的名称. (请注意,该行是由Exchange Server生成的电子邮件正文的一部分,而不是由Gmail组成.)

Here is an image of what the email looks like, in Gmail. (The times are bit different from my above example, sorry). The appointment time is correct, but it in the email body it calls it "Eastern Standard Time", which is not right -- it should be "Eastern Daylight Time" or something like that. (Note that line is part of the email body generated by the Exchange Server, it is not something made up by Gmail.)

推荐答案

您要查找的Windows时区键完全是:"Eastern Standard Time".这涵盖了美国东部时区,包括 both 东部标准时间和东部夏令时间.显示名称为"(UTC-05:00) Eastern Time (US & Canada)".

The Windows Time Zone key you're looking for is exactly: "Eastern Standard Time". This covers the US Eastern time zone, inclusive of both Eastern Standard Time and Eastern Daylight Time. It has a display name of "(UTC-05:00) Eastern Time (US & Canada)".

这实际上是我在时区标签Wiki 中提到的示例之一-如果您没有,请阅读还没有.

This is actually one of the examples I call out in the timezone tag wiki - which you should read if you haven't already.

找到的另一个键"US Eastern Standard Time"实际上是针对显示名称为"(UTC-05:00) Indiana (East)"的区域的-由于历史原因,该区域已被隔离,现在已过时. (请参见印第安纳州时间

The other key you found "US Eastern Standard Time" is actually for the zone with the display name of "(UTC-05:00) Indiana (East)" - which is segregated for historical reasons and is now obsolete. (See the Wikipedia entry on Time in Indiana, and Microsoft's KB article on this if you are interested in why.)

如果您在Windows注册表中的HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones中查看,则会看到有效的密钥.在每个键中,您将看到与每个键对应的Display名称.这说明了在Windows中更改时区时它们的显示方式.

If you look in the Windows Registry at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones, you will see the valid keys. In each key, you will see the Display name that corresponds to each. This explains how they appear when you change your time zone in Windows.

关于Exchange Web服务,在您提到的文章,它确实讨论了如何使用键名.但是,它也讨论了如何在MeetingTimeZone元素中传递更多信息并改为使用显示名称.

With regards to Exchange Web Services, in the article you mentioned, it does talk about how you can use the key name. But it also talks about how you can pass much more information in the MeetingTimeZone element and use a display name instead.

如果与Google日历(及其他日历)的互操作性很重要,则可以考虑在TimeZoneName属性中传递IANA时区名称-在这种情况下,该名称为America/New_York.您仍然需要提供<BaseOffset><Standard><Daylight>元素,以便它可以在Windows上正常工作.请参阅该文章中的MeetingTimeZone部分.

If interoperability with Google Calendar (and others) is important, you might consider passing the IANA time zone name in the TimeZoneName attribute - in this case it would be America/New_York. You would still need to provide the <BaseOffset>, <Standard>, and <Daylight> elements, so that it will work right on Windows. See the MeetingTimeZone section in that article.

我应该声明我自己没有尝试过这种方法,但是从文档中可以看出,如果您提供这些元素,则TimeZoneName对Windows的重要性将降低,但仍然可以通过一起.

I should state that I haven't tried this approach myself, but it appears from the documentation that if you provide those elements that the TimeZoneName becomes less important to Windows but would still get passed along.

您当然应该能够使用Microsoft的方法通过它:

You should certainly be able to pass it using Microsoft's approach:

<MeetingTimeZone TimeZoneName="(GMT-05:00) Eastern Time (US &amp; Canada)">
  <BaseOffset>P0DT5H0M0.0S</BaseOffset>
  <Standard>
    <Offset>P0DT0H0M0.0S</Offset>
    <RelativeYearlyRecurrence>
      <DaysOfWeek>Sunday</DaysOfWeek>
      <DayOfWeekIndex>First</DayOfWeekIndex>
      <Month>November</Month>
    </RelativeYearlyRecurrence>
    <Time>02:00:00.0000000</Time>
  </Standard>
  <Daylight>
    <Offset>-P0DT1H0M0.0S</Offset>
    <RelativeYearlyRecurrence>
      <DaysOfWeek>Sunday</DaysOfWeek>
      <DayOfWeekIndex>Second</DayOfWeekIndex>
      <Month>March</Month>
    </RelativeYearlyRecurrence>
    <Time>02:00:00.0000000</Time>
  </Daylight>
</MeetingTimeZone>

我的建议是,您可以通过传递IANA区域名称来对其稍作调整,以查看其在Gmail和Google日历中是否正常运行:

What I'm suggesting is that you tweak it slightly by passing the IANA zone name instead and see if it behaves properly with Gmail and Google Calendar:

<MeetingTimeZone TimeZoneName="America/New_York">
  <BaseOffset>P0DT5H0M0.0S</BaseOffset>
  <Standard>
    <Offset>P0DT0H0M0.0S</Offset>
    <RelativeYearlyRecurrence>
      <DaysOfWeek>Sunday</DaysOfWeek>
      <DayOfWeekIndex>First</DayOfWeekIndex>
      <Month>November</Month>
    </RelativeYearlyRecurrence>
    <Time>02:00:00.0000000</Time>
  </Standard>
  <Daylight>
    <Offset>-P0DT1H0M0.0S</Offset>
    <RelativeYearlyRecurrence>
      <DaysOfWeek>Sunday</DaysOfWeek>
      <DayOfWeekIndex>Second</DayOfWeekIndex>
      <Month>March</Month>
    </RelativeYearlyRecurrence>
    <Time>02:00:00.0000000</Time>
  </Daylight>
</MeetingTimeZone>

这篇关于如何为Exchange Web服务(不管理XML)指定EDT(夏令时)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆