为多个客户(包括Google)编写ICS文件 [英] Writing ICS files for multiple clients, including Google

查看:138
本文介绍了为多个客户(包括Google)编写ICS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个脚本来发布.ICS文件.我已经读到很难做到这一点,这可能是因为某些日历客户端存在故障(很多人声称Google日历特别是在时区方面存在许多故障),或者是因为开发人员未正确遵循规范.我只需要在北美进行此操作,但我必须考虑DST(请记住亚利桑那州等地方,其中有些地方遵守DST,而有些地方没有DST).

I need to write a script for publishing .ICS files. I've read that it's difficult to do this right, either because some calendar clients are buggy (lots of people claim Google Calendar is extremely buggy especially regarding time zones) or because developers aren't following the spec properly. I only need to do this for North America but I do have to account for DST (keeping in mind places like Arizona, parts of which observe DST and parts of which don't).

任何人都可以回答这些问题吗?

Can anyone answer these questions?

  1. 指定开始时间和结束时间 对于一个事件,这应该是 始终在用户本地提供 时间还是我可以将其作为UTC时间发送 留给客户去算 出来?
  2. 我需要带些额外的东西吗? 在DST中说明DST的步骤 用户的位置?
  3. 我必须带走吗 任何额外的步骤来说明 Google?
  1. When specifying a start and end time for an event, should this be provided always in the user's local time or can I send it as a UTC time and leave it to the client to figure it out?
  2. Do I have to take any extra steps to account for DST at the user's location?
  3. Do I have to take any extra steps to account for Google?

还有其他提示吗?

推荐答案

您没听错-这并不容易.容易提供非常基本的ics支持,而不是那么容易提供ics提供者可能输出的完整支持;尤其是重复发生,异常,修改和是时区.

You've heard right - it is not easy. Easy to offer very basic ics support, not that easy to offer complete support to what an ics provider may output; especially wrt recurrences, exceptions, modifications and yes timezones.

我在ICS发布者上工作了很长时间,现在已经很稳定了.一路上我做了一些笔记.

I have been working on my ics publisher for a long long time, it is pretty stable now. I have made some notes along the way.

请参见 http://icalevents.com/category/notes/.另外,在我的网站上的时区标签可能会对您有所帮助.

See http://icalevents.com/category/notes/. Also the timezone tag on my site you may find helpful.

尤其是,如果您遇到重复发生的事件,则值得一看的"ical备忘单".完成此工作后,我重写了重复引擎.

In particular, if you are getting into recurring events, the " ical cheatsheet" is worth a look. I rewrote my recurrence engine after working through that.

我发现Google没问题,这是较小的播放器,尤其是当他们开始做一些不太标准的事情(基于Zimbra/Pc的tz等)时.

Google I have not found to be a problem, it is the smaller players, particularly when they start doing slightly non-standard things (Zimbra/Pc based tz's etc).

尽管Google的更新速度可能很慢(例如有人更新了Google日历,但您重新获取了ics文件(肯定不是从缓存中获取),并且没有更新-可能需要一个小时左右的时间.我们学校在做时事通讯时-他们也从网站上进行印刷,所以我现在不得不创建另一面-wp中我们自己的ics编辑器.

Although Google can be slow to update (ie someone updates their google calendar, you refetch the ics file (definitely not from your cache) and it does not have the update - can take an hour or so. This was no good for our school when doing their newsletter - they do a print run too from the website. SO I have resorted to creating the other side now - our own ics editor in wp.

那里有各种各样的免费ical脚本-为什么要自己动手制作脚本?热衷于挑战吗?

There are various free ical scripts out there - why roll your own ? Keen for a challenge?

这篇关于为多个客户(包括Google)编写ICS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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