from datetime import datetime
from typing import Any, Optional, Union

from django.template import Node
from django.template.base import FilterExpression, NodeList, Parser, Token
from django.template.context import Context
from django.utils.safestring import SafeText
from django.utils.timezone import FixedOffset

register: Any

class datetimeobject(datetime): ...

def localtime(value: Optional[Union[datetime, str]]) -> Union[datetimeobject, str]: ...
def utc(value: Optional[Union[datetime, str]]) -> Union[datetimeobject, str]: ...
def do_timezone(
    value: Optional[Union[datetime, str]], arg: Optional[Union[FixedOffset, str]]
) -> Union[datetimeobject, str]: ...

class LocalTimeNode(Node):
    origin: Origin
    token: Token
    nodelist: NodeList = ...
    use_tz: bool = ...
    def __init__(self, nodelist: NodeList, use_tz: bool) -> None: ...
    def render(self, context: Context) -> SafeText: ...

class TimezoneNode(Node):
    origin: Origin
    token: Token
    nodelist: NodeList = ...
    tz: FilterExpression = ...
    def __init__(self, nodelist: NodeList, tz: FilterExpression) -> None: ...
    def render(self, context: Context) -> SafeText: ...

class GetCurrentTimezoneNode(Node):
    origin: Origin
    token: Token
    variable: str = ...
    def __init__(self, variable: str) -> None: ...
    def render(self, context: Context) -> str: ...

def localtime_tag(parser: Parser, token: Token) -> LocalTimeNode: ...
def timezone_tag(parser: Parser, token: Token) -> TimezoneNode: ...
def get_current_timezone_tag(parser: Parser, token: Token) -> GetCurrentTimezoneNode: ...
