MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / _seconds_between

Method _seconds_between

apps/admin/services.py:1287–1296  ·  view source on GitHub ↗
(
        self, start: Optional[datetime], end: Optional[datetime]
    )

Source from the content-addressed store, hash-verified

1285 return timeline
1286
1287 def _seconds_between(
1288 self, start: Optional[datetime], end: Optional[datetime]
1289 ) -> Optional[int]:
1290 if start is None or end is None:
1291 return None
1292 if start.tzinfo is None and end.tzinfo is not None:
1293 end = end.replace(tzinfo=None)
1294 elif start.tzinfo is not None and end.tzinfo is None:
1295 start = start.replace(tzinfo=None)
1296 return int((end - start).total_seconds())
1297
1298 def _build_policy_action_update(
1299 self,

Callers 2

_build_file_timelineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected