import re
from collections.abc import Generator
from datetime import datetime, timedelta, tzinfo
from typing import TypeVar

_DateTimeT = TypeVar("_DateTimeT", bound=datetime)

class StaticTzInfo(tzinfo):
    def __init__(self, name: str, offset: timedelta) -> None: ...
    def tzname(self, dt: datetime | None) -> str: ...
    def utcoffset(self, dt: datetime | None) -> timedelta: ...
    def dst(self, dt: datetime | None) -> timedelta: ...
    def localize(self, dt: _DateTimeT, is_dst: bool = False) -> _DateTimeT: ...
    def __getinitargs__(self) -> tuple[str, timedelta]: ...

def pop_tz_offset_from_string(date_string: str, as_offset: bool = True) -> tuple[str, StaticTzInfo | str | None]: ...
def word_is_tz(word: str) -> bool: ...
def convert_to_local_tz(datetime_obj: _DateTimeT, datetime_tz_offset: timedelta) -> _DateTimeT: ...
def build_tz_offsets(search_regex_parts: list[str]) -> Generator[tuple[str, dict[str, re.Pattern[str] | timedelta]]]: ...
def get_local_tz_offset() -> timedelta: ...

local_tz_offset: timedelta
