MCPcopy
hub / github.com/celery/celery / local

Method local

celery/utils/time.py:164–173  ·  view source on GitHub ↗

Return the local system timezone for the application.

(self)

Source from the content-addressed store, hash-verified

162
163 @cached_property
164 def local(self) -> tzinfo:
165 """Return the local system timezone for the application."""
166 try:
167 timezone = get_localzone()
168 except Exception as ex:
169 timezone = None
170 logger.warning("Failed to retrieve local timezone (%s): %s", type(ex).__name__, ex)
171 if timezone is None:
172 return LocalTimezone()
173 return timezone
174
175 @cached_property
176 def utc(self) -> tzinfo:

Callers 2

LoggingProxyClass · 0.80
__init__Method · 0.80

Calls 1

LocalTimezoneClass · 0.85

Tested by

no test coverage detected