API或库来处理vCalendar信息



我不具备解析vCalendar文件的时区转换方面的专业知识-提取一些信息很简单,但试图解决开始和结束时间并考虑时区和夏令时并不容易,并且没有重新发明轮子的意义。

有没有人知道一个函数库,你可以传递一个。ics文件,它返回各种信息?

,

GetStartTimeCorrectedForMyLocalTimezone("c:c192837.ics")

将返回事件在我的本地时区的开始时间。

我还没有尝试过,但有库:
http://sourceforge.net/projects/icalparser/和
http://www.ddaysoftware.com/Pages/Projects/DDay.iCal/

在http://csharpdotnet-aditikothari.blogspot.de/2013/01/ics-fileicalendar-attached-with-email.html页面上有一些关于如何手动解析格式的信息。

但是如果你的主要问题是时区,那么如果我是正确的,时间都是UTC在ics

DateTime localTime = DateTime.SpecifyKind(DateTime.Parse(strDate),  
                                          DateTimeKind.UTC).ToLocalTime();

最新更新