Generate iCal VTIMEZONE block with DAYLIGHT and STANDARD components, based on pytz zoneinfo data
In the last few days I spent a lot of time trying to find a library or repository of some kind that could help me generate the required DAYLIGHT and STANDARD components of ical VTIMEZONE blocks. Since I couldn't find anything, I cobbled together this snippet to poke around in pytz timezone information and output the bare minimum I needed to make my ICS files compliant and useful (DST transitions for this year and the next). I promise it's (superficially) tested against "real" ICS files, but that's all. UPDATE: Thanks to @ariannedee for a much improved version (see comment for details)
- pytz
- timezones
- ical
- icalendar
- ics