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

Method _align_datetime

apps/admin/services.py:1332–1337  ·  view source on GitHub ↗
(self, value: datetime, reference: datetime)

Source from the content-addressed store, hash-verified

1330 return base_time + timedelta(**duration)
1331
1332 def _align_datetime(self, value: datetime, reference: datetime) -> datetime:
1333 if value.tzinfo is None and reference.tzinfo is not None:
1334 return value.replace(tzinfo=reference.tzinfo)
1335 if value.tzinfo is not None and reference.tzinfo is None:
1336 return value.replace(tzinfo=None)
1337 return value
1338
1339 def _match_admin_file(
1340 self,

Callers 1

_extended_expirationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected