icalendar.timezone.pytz module#

Use pytz timezones.

class icalendar.timezone.pytz.PYTZ[source]#

Bases: TZProvider

Provide icalendar with timezones from pytz.

create_timezone(tz: Timezone.Timezone) tzinfo[source]#

Create a pytz timezone from the given information.

fix_rrule_until(rrule: rrule, ical_rrule: prop.vRecur) None[source]#

Make sure the until value works for the rrule generated from the ical_rrule.

knows_timezone_id(id: str) bool[source]#

Whether the timezone is already cached by the implementation.

localize(dt: datetime, tz: tzinfo) datetime[source]#

Localize a datetime to a timezone.

localize_utc(dt: datetime) datetime[source]#

Return the datetime in UTC.

name = 'pytz'#
timezone(name: str) tzinfo | None[source]#

Return a timezone with a name or None if we cannot find it.

uses_pytz() bool[source]#

Whether we use pytz.

uses_zoneinfo() bool[source]#

Whether we use zoneinfo.