[Vobject] Add VTIMEZONE to a new iCalendar-Object

Alexander Johannes alex at nirgal.de
Wed Dec 29 11:30:22 CST 2010


Hi Jeffrey,

Am 27.12.2010 um 23:31 schrieb Jeffrey Harris:

>> i'd like to add a VTIMEZONE-Component to a new iCalendar.
>> 
> vobject will automatically construct a VTIMEZONE component if you have a datetime DTSTART with a reasonable tzinfo class. You shouldn't need to register a tzid manually.

This hint and some further poking got me on the right track. I used pytz to add a timezone to my dates. Vobject obviously did not use the information, because the tzinfo-objects generated by pytz are not compatible for most timezones.

So i went ahead and switched to dateutil for tzinfo-generation, which vobject is also using and everything works like advertised.

I appreciated your help. Thank you very much.

Alex


More information about the VObject mailing list