icalendar.timezone.tzp module#
- class icalendar.timezone.tzp.TZP(provider='zoneinfo')[source]#
Bases:
objectThis is the timezone provider proxy.
If you would like to have another timezone implementation, you can create a new one and pass it to this proxy. All of icalendar will then use this timezone implementation.
- cache_timezone_component(timezone_component)[source]#
Cache the timezone that is created from a timezone component if it is not already known.
This can influence the result from timezone(): Once cached, the custom timezone is returned from timezone().
- clean_timezone_id(tzid)[source]#
Return a clean version of the timezone id.
Timezone ids can be a bit unclean, starting with a / for example. Internally, we should use this to identify timezones.
- Return type:
- create_timezone(timezone_component)[source]#
Create a timezone from a timezone component.
This component will not be cached.
- localize_utc(dt)[source]#
Return the datetime in UTC.
If the datetime has no timezone, set UTC as its timezone.
- Return type: