MCPcopy Create free account
hub / github.com/python-pendulum/pendulum / _get_darwin_timezone

Function _get_darwin_timezone

src/pendulum/tz/local_timezone.py:152–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150
151
152def _get_darwin_timezone() -> Timezone:
153 # link will be something like /usr/share/zoneinfo/America/Los_Angeles.
154 link = os.readlink("/etc/localtime")
155 tzname = link[link.rfind("zoneinfo/") + 9 :]
156
157 return Timezone(tzname)
158
159
160def _get_unix_timezone(_root: str = "/") -> Timezone:

Callers 1

_get_system_timezoneFunction · 0.85

Calls 1

TimezoneClass · 0.90

Tested by

no test coverage detected