ICS 文件中缺少 Olsen TZ TZID 格式是否有解决方法
最近,我在电子邮件中收到的 ICS 文件遇到了问题。我的 Outlook 2010 副本无法正确识别时区。以下是 ICS 文件中会议开始时间的表示方式:
DTSTART;TZID=America/Los_Angeles:20110928T183000
当 Outlook 导入此文件时,它将时间从太平洋时间下午 6:30 更改为太平洋时间晚上 7:30。经过一些实验,我能够通过更改时区格式获得在 Outlook 中正确导入的 ICS 文件:
DTSTART;TZID="Pacific Time":20110928T183000
经过进一步的研究,我发现 ICS 文件规范 未解决时区识别问题,但建议使用 Olsen TZ 数据库。 Microsoft Outlook 团队似乎选择忽略此建议。
鉴于 Outlook 是相当流行的日历客户端,是否有一种可靠的方法可以为 Outlook 格式化 ICS 时区,同时仍与其他客户端兼容?我对此问题最担心的是 Outlook 导入过程中出现无提示错误。用户很容易在错误的时间出席会议,因为 Outlook 不会发出关于时区混淆的警告。我们是否应该直接将 Outlook 用户引导至不同的文件格式?
注意:我知道这个问题与之前的帖子类似,但该帖子中的参考文献似乎已过期,我想知道是否有更好的解决方案。
I recently had a problem with an ICS file that I received in email. My copy of Outlook 2010 would not recognize the timezone correctly. Here is the way that the start time of a meeting was represented in the ICS file:
DTSTART;TZID=America/Los_Angeles:20110928T183000
When Outlook imported this file, it changed the time from 6:30 pm Pacific time to 7:30 pm Pacific time. After some experimentation I was able to get an ICS file that imported correctly in Outlook by changing the time zone format:
DTSTART;TZID="Pacific Time":20110928T183000
After some further research I found that the ICS file specification leaves the question of time zone identification open, but suggests using the Olsen TZ database. It appears that the Microsoft Outlook team has chosen to ignore this suggestion.
Given that Outlook is a fairly popular calendar client, is there a reliable way to format ICS time zones for Outlook that is still compatible with other clients? My biggest concern about this issue is the silent error during the Outlook import. Users could easily show up for a meeting at the wrong time, since Outlook gives no warning that it's confused about the time zone. Should we simply direct Outlook users to a different file format?
Note: I know that this question is similar to an earlier post, but the references on that post appear to have expired, and I'm wondering if there are any better solutions out there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
没有完整的 iCalendar 文件很难判断,但是您的日历文件中是否定义/是否有一个
VTIMEZONE
组件来定义 America/Los_Angeles 应该是什么?像这样的东西:
Hard to judge without the full iCalendar file but did you define/do you have a
VTIMEZONE
component in your calendar file which defines what America/Los_Angeles should be?Something like:
与其将时区定义添加到 ics 文件中,不如在 UTC 本身中提及事件开始/结束时间。
然后,ICS 文件的使用者(在您的情况下为 Outlook)应该能够在将会议事件呈现在其日历上之前,将时区从 UTC(来自 ics 文件)转换为最终用户的首选时区设置。
优点:
这样您就不必自己添加正确的时区偏移(VTIMEZONE 组件)。
另外,ics 文件更小、更干净、更易于阅读。
参考文献:
甚至 google 似乎也在以这种方式处理 ics 中的时区 - Google 时区处理
希望这会有所帮助。
Instead of adding the timezone definition to the ics file, it would be better to mention the event start/end times in UTC itself.
And then, the consumer of the ICS file - outlook in your case - should be able to do the timezone conversion from UTC(from ics file) to the preferred timezone setting of the end user, just before rendering the meeting event on their calendars.
Pros:
This way you dont have to take care of adding the correct timezone offsets (VTIMEZONE component) yourself.
Plus, the ics file is much smaller, cleaner, easy to read.
References:
Even google seems to be handling timezones in ics this way itself - Google timezone handling
Hope this helps.
假设提问者住在洛杉矶并使用 OUTLOOK2010。
并且
20110928T183000
开始时间基于 PDT如果您想让会议成功,您可以在描述中添加会议预约项目、联系人和谷歌地图 URL 地址电话开放时间。
当然,会议项目应该添加组织者和参加者,但是很难设置。
并且大约75个八位位组的回车和插入空格是困难的。所以只设置组织者和参加者在描述中写入。
Suppose the questioner lives in Los Angeles and uses OUTLOOK2010.
And
20110928T183000
Start time is based on PDTIf you want to make meeting successful, You add Meeting appointment item, contact, and google map URL Address phone open time in description.
Of course, meeting item should add Organizer and Attendee, but it is so hard to set.
And about 75 octet carriage return and inserting space is difficult. So only set organizer and attendee write in description.