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

Method is_local

src/pendulum/datetime.py:293–294  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

291 return self.date().diff(self.now(self.tz).date(), abs=False).in_years()
292
293 def is_local(self) -> bool:
294 return self.offset == self.in_timezone(pendulum.local_timezone()).offset
295
296 def is_utc(self) -> bool:
297 return self.offset == 0

Callers 1

test_localFunction · 0.80

Calls 1

in_timezoneMethod · 0.95

Tested by 1

test_localFunction · 0.64