MCPcopy
hub / github.com/django/django / get_default_timezone

Function get_default_timezone

django/utils/timezone.py:46–52  ·  view source on GitHub ↗

Return the default time zone as a tzinfo instance. This is the time zone defined by settings.TIME_ZONE.

()

Source from the content-addressed store, hash-verified

44# wrap the logic in a function and cache the result.
45@functools.lru_cache
46def get_default_timezone():
47 """
48 Return the default time zone as a tzinfo instance.
49
50 This is the time zone defined by settings.TIME_ZONE.
51 """
52 return zoneinfo.ZoneInfo(settings.TIME_ZONE)
53
54
55# This function exists for consistency with get_current_timezone_name

Callers 8

get_feedMethod · 0.90
__init__Method · 0.90
rMethod · 0.90
get_current_timezoneFunction · 0.85

Calls

no outgoing calls

Tested by 3