1

I'm currently using the Python icalendar module to generate ics invite files. In order to do this I need to be able to determine the start and end dates of when daylight savings is in effect to include in the Timezone icalendar section (which some clients require). My question is what if any Python module exists which can take a timezone by name and return the start and end information for when daylight savings is in effect. I've looked into both the dateutil and pytz modules and neither seem to offer this functionality.

To elaborate what I'd like to do with Python is take EST or US-Eastern and get the 2015 duration of daylight savings of March 8th, 2:00AM through November 1st 2:00AM. Dateutil seems to support this by specifying 'EST5EDT', however according to the documentation this defaults to the "sunday of April to start daylight saving, and the last sunday of October" which is not accurate.

Ideally I'd also be able to get the same information for non-US timezones as well such as Australia.

vvvvv
  • 25,404
  • 19
  • 49
  • 81
zeroSteiner
  • 53
  • 1
  • 5
  • You should be using standard TZDB time zones, such as `America/New_York`, rather than the ones you mentioned. – Matt Johnson-Pint Oct 09 '15 at 17:05
  • Possible duplicate of [How to determine when DST starts or ends in a specific location in Python?](http://stackoverflow.com/questions/7594656/how-to-determine-when-dst-starts-or-ends-in-a-specific-location-in-python) – Matt Johnson-Pint Oct 09 '15 at 17:07

0 Answers0