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

Method get_offset

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

Source from the content-addressed store, hash-verified

300 return self.dst() != datetime.timedelta()
301
302 def get_offset(self) -> int | None:
303 utcoffset = self.utcoffset()
304 if utcoffset is None:
305 return None
306
307 return int(utcoffset.total_seconds())
308
309 def date(self) -> Date:
310 return Date(self.year, self.month, self.day)

Callers 2

offsetMethod · 0.95
offset_hoursMethod · 0.95

Calls 2

utcoffsetMethod · 0.80
total_secondsMethod · 0.45

Tested by

no test coverage detected