Outlook 无法正确导入带有时区的 VCS?

发布于 2024-12-15 17:22:40 字数 1270 浏览 0 评论 0原文

在我们的 ASP Web 应用程序中,我们有一个模块可以生成要导入到您的日历中的 VCS 文件。 如果客户端与我们位于同一区域(GMT),则此方法可以正常工作。

但是,如果我创建一个在 UTC-01 上午 9 点开始的事件,我仍然会得到该事件在 UTC/GMT 上午 9 点开始,就像它不会读取 TZOFFSET

这是生成的 VCS。在此示例中,事件预计于 2011 年 12 月 30 日上午 9 点至上午 10 点(UTC-05)(纽约)举行。如果我将时区设置为 GMT,我会得到上午 9 点至上午 10 点的预约,而不是计算时差。即使我更改时区,它始终会计算与 GMT 的差异,而不是事件发生的时区。

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:-Microsoft
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
TZ:UTC-05
X-MICROSOFT-CDO-TZID:10
BEGIN:STANDARD
DTSTART:20111230T090000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART: 20111230T090000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20111116T100300Z
DTSTART;TZID=America/New_York:20111230T090000
SUMMARY;ENCODING=QUOTED-PRINTABLE:TEST
UID:12347a7833h
ORGANIZER;CN=Test:MAILTO:[email protected]
LOCATION;ENCODING=QUOTED-PRINTABLE:Hall A
DTEND;TZID=America/New_York:20111230T100000
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:
SEQUENCE:0
PRIORITY:5
TRANSP:OPAQUE
CATEGORIES:Test
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

我已经在谷歌上搜索了好几天了,似乎找不到任何关于如何正确生成 VCS 的好的文档。

任何帮助都会很棒!

谢谢, 费德里科

On our web app in ASP, we have a module that generates VCS files to be imported into your calendar.
This works fine if the client is on the same zone as us (GMT).

But If I create an event which starts at 9am in UTC-01 for example, I still get the event as starting at 9am UTC/GMT, it's like it won't read the TZOFFSET

This is the VCS generated. In this example the event is supposed to take place Dec 30th 2011 9am-10am in UTC-05 (New York). If I leave my time zone as GMT, I get the appointment as 9am-10am instead of calculating the time difference. Even if I change my timezones it always calculates the difference against GMT and not the Time Zone where the event is taking place.

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:-Microsoft
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/New_York
TZ:UTC-05
X-MICROSOFT-CDO-TZID:10
BEGIN:STANDARD
DTSTART:20111230T090000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART: 20111230T090000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20111116T100300Z
DTSTART;TZID=America/New_York:20111230T090000
SUMMARY;ENCODING=QUOTED-PRINTABLE:TEST
UID:12347a7833h
ORGANIZER;CN=Test:MAILTO:[email protected]
LOCATION;ENCODING=QUOTED-PRINTABLE:Hall A
DTEND;TZID=America/New_York:20111230T100000
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:
SEQUENCE:0
PRIORITY:5
TRANSP:OPAQUE
CATEGORIES:Test
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

I've been googling around for several days now and can't seem to find any good documentation on how to generate VCS correctly.

Any help will be great!

Thanks,
Federico

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

枯叶蝶 2024-12-22 17:22:40

我确信 OP 已经解决了这个问题,但这里有一篇很棒的博客文章,讨论了 Microsoft 用于帮助 Outlook 中时区解释的专有“X-MICROSOFT-CDO-TZID”标签: http://hello-dot-wordpress.blogspot.com/2009/10/my-guide-to-x-microsoft-cdo-tzid.html

编辑:更新了链接。

I'm sure the OP has solved this already, but here's a great blog post that discusses the proprietary "X-MICROSOFT-CDO-TZID" tag that Microsoft uses to help with timezone interpretation in Outlook: http://hello-dot-wordpress.blogspot.com/2009/10/my-guide-to-x-microsoft-cdo-tzid.html

Edit: Updated Link.

我最亲爱的 2024-12-22 17:22:40

以下是我提到的博客文章中的文本(不再可用):

==========

问题如下:如果您在 Google 中搜索如何创建 Outlook 日历电子邮件通知/ics 文件,您可能会发现偶然发现这个页面,其中有一个您可以使用的通用模板。或者您可以向自己发送邀请并查看 ICS 文件的源代码。

无论哪种方式,您都会在 VTIMEZONE 块中看到以下几行:

TZID:(GMT-05.00) Eastern Time (US & Canada)
X-MICROSOFT-CDO-TZID:10

请注意奇怪的 X-MICROSOFT-CDO-TZID 行...它只有一个数字“10”。嗯,根据 Microsoft 的说法,数字 10 代表美国东部时区。在 Google 中搜索,您可能会看到更多这种奇怪的数字/位置映射的示例,但您很难找到所有映射的完整列表。 11 是中部时间,12 是山区时间,13 是太平洋时间,但 38 是亚利桑那州山区时间...?

经过大量研究(并给 MSFT 员工打电话),我们在 MSDN 网站的深处找到了这份文档:http://msdn.microsoft.com/en-us/library/aa563018(loband).aspx

它记录了所有时区“数字”您需要使用它才能正确设置 ICS 文件。

==========

干杯!

Here's the text from the blog post I mentioned (which is no longer available):

==========

Here's the issue: If you search Google on how to create an Outlook Calendar email notification/ics file, you might stumble across this page which has a generic template you could use. Or you might send yourself an invitation and look at the source code for the ICS file.

Either way you'll see the following lines within the VTIMEZONE block:

TZID:(GMT-05.00) Eastern Time (US & Canada)
X-MICROSOFT-CDO-TZID:10

Notice the strange X-MICROSOFT-CDO-TZID line... it simply has a number, "10". Well, according to Microsoft the number 10 represents the Eastern Time Zone here in America. Searching Google you might see more examples of this strange number/location mapping but you'll be hard pressed to find a complete listing of all the mappings. 11 is Central Time, 12 is Mountain Time, 13 is Pacific Time, but 38 is Mountain Time for Arizona...?

After much research (and a phone call to a MSFT employee), we found this document deep within a MSDN website: http://msdn.microsoft.com/en-us/library/aa563018(loband).aspx

It documents all the time zone "numbers" you'll need to use in order to correctly set up an ICS file.

==========

Cheers!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文