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

Method int_timestamp

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

Source from the content-addressed store, hash-verified

235
236 @property
237 def int_timestamp(self) -> int:
238 # Workaround needed to avoid inaccuracy
239 # for far into the future datetimes
240 dt = datetime.datetime(
241 self.year,
242 self.month,
243 self.day,
244 self.hour,
245 self.minute,
246 self.second,
247 self.microsecond,
248 tzinfo=self.tzinfo,
249 fold=self.fold,
250 )
251
252 delta = dt - self._EPOCH
253
254 return delta.days * SECONDS_PER_DAY + delta.seconds
255
256 @property
257 def offset(self) -> int | None:

Callers

nothing calls this directly

Calls 1

datetimeMethod · 0.45

Tested by

no test coverage detected