MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / fixed_timezone

Function fixed_timezone

src/pendulum/tz/__init__.py:26–36  ·  view source on GitHub ↗

Return a Timezone instance given its offset in seconds.

(offset: int)

Source from the content-addressed store, hash-verified

24
25
26def fixed_timezone(offset: int) -> FixedTimezone:
27 """
28 Return a Timezone instance given its offset in seconds.
29 """
30 if offset in _tz_cache:
31 return _tz_cache[offset]
32
33 tz = FixedTimezone(offset)
34 _tz_cache[offset] = tz
35
36 return tz
37
38
39def local_timezone() -> Timezone | FixedTimezone:

Callers 3

timezoneFunction · 0.90
test_fixed_timezoneFunction · 0.90
test_fixed_equalityFunction · 0.90

Calls 1

FixedTimezoneClass · 0.90

Tested by 2

test_fixed_timezoneFunction · 0.72
test_fixed_equalityFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…