iCal供稿全天事件空白出整整一天 [英] iCal feed all day events blank out entire day

查看:297
本文介绍了iCal供稿全天事件空白出整整一天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是很旧的版本Telerik的RadScheduler的是出口任命ICS文件,使他们能够被输送到一个iPhone。

I am using a very old version of Telerik RadScheduler that exports appointments to an ics file so they can be fed to an iPhone.

这是Telerik的code:

This is the telerik code:

 TimeZoneInfo localZone = TimeZoneInfo.Local;
 TimeSpan ts = localZone.BaseUtcOffset;
 return RadScheduler.ExportToICalendar(scheduler.Appointments, ts);`

我的服务器是在GMT,我的iPhone在NZDT(+13),我的约会都存储在UTC。

My server is in GMT, my iPhone is in NZDT (+13), my appointments are stored in UTC.

我有一些整天约会是午夜直到午夜NZDT时间。他们出口是这样的:

I have some all day appointments that are midnight til midnight NZDT time. They are exporting like this:

 BEGIN:VEVENT DTSTART:20141205T110000Z 
 DTEND:20141206T110000Z
 UID:20141202T140355Z-907 
 DTSTAMP:20141202T140355Z SUMMARY: Day Off
 DESCRIPTION:Own Day END:VEVENT

当它们显示在iPhone上不显示为全天事件,他们只是空白了整整一天午夜到午夜约会。

When they display on the iPhone they don't show as all day events, they just blank out the whole day midnight to midnight as an appointment.

我非常愿意重新写自己的iCal,如果它是错的,但我不知道它应该是什么。我已搜查了谷歌的iCal的全天事件的例子,但我找不到任何适当的文件(在错误的地方寻找可能),什么我发现似乎是不一致的。

I am very willing to re-write the ical myself if it is wrong but I don't know what it should be. I have searched google for examples of iCal all day events but I can't find any proper documentation (maybe looking in the wrong place), and what I am finding appears to be inconsistent.

我想知道的是,这是什么做的时区或者是输出不正确的?
应在开始和结束时间是一整天的事件是什么,或者是有全天事件的关键,需要加以补充?

What I want to know is, is this something to do with the timezone or is the output incorrect? What should the start and end times be for all day events, or is there a key for "all day events" that needs to be added?

推荐答案

不是100%肯定的iOS如何实现它,但RFC5545的 3.6.1 说:

not 100% sure about how iOS implements it but the RFC5545 3.6.1says:

[...]的DTEND属性
        一个VEVENT日历组件指定非包容结束
        的事件。对于情况下,一个VEVENT日历组件
        指定一个Date类型,而是DTSTART无财产
        DTEND,也不是持续时间属性,该事件的持续时间被送往
        有一天。[...]

[...]The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event. For cases where a "VEVENT" calendar component specifies a "DTSTART" property with a DATE value type but no "DTEND" nor "DURATION" property, the event's duration is taken to be one day.[...]

所以你的情况,你应该尝试删除 DTEND 属性。

so in your case you should try to remove the DTEND property.

这篇关于iCal供稿全天事件空白出整整一天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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