Skip to main content

get_fixed_timezone

Return a tzinfo instance with a fixed offset from UTC.

def get_fixed_timezone(
offset: int | datetime.timedelta
) - > datetime.timezone

Return a tzinfo instance with a fixed offset from UTC.

Parameters

NameTypeDescription
offset`intdatetime.timedelta`

Returns

TypeDescription
datetime.timezoneA timezone instance representing the specified fixed offset from UTC, with a name formatted as +/-HHMM.