Main class for handling Windows time zones. Usage: TimeZoneInfo(<Time Zone Standard Name>, [<Fix Standard Time>])
>>> tzi = TimeZoneInfo('Pacific Standard Time') >>> march31 = datetime.datetime(2000,3,31)We know that time zone definitions haven't changed from 2007 to 2012, so regardless of whether dynamic info is available, there should be consistent results for these years.
>>> subsequent_years = [march31.replace(year=year) ... for year in range(2007, 2013)] >>> offsets = set(tzi.utcoffset(year) for year in subsequent_years) >>> len(offsets) 1Cannot create a `TimeZoneInfo` with an invalid name.
>>> TimeZoneInfo('Does not exist') Traceback (most recent call last): ... ValueError: Timezone Name 'Does not exist' not found >>> TimeZoneInfo(None) Traceback (most recent call last): ... ValueError: subkey name cannot be empty >>> TimeZoneInfo("") Traceback (most recent call last): ... ValueError: subkey name cannot be empty