Skip to main content

tz

Returns a dictionary containing the name of the current Django time zone for use in template contexts.

def tz(
request: HttpRequest
) - > dict

Returns a dictionary containing the name of the current active time zone for the request context.

Parameters

NameTypeDescription
requestHttpRequestThe Django HttpRequest object used to determine the current time zone context.

Returns

TypeDescription
dictA dictionary with the key 'TIME_ZONE' mapping to the string name of the current time zone.