Skip to main content

pydatetime_as_datetime

No overview available.

def pydatetime_as_datetime(
dt: datetime.datetime
) - > datetime.datetime

Converts a Python datetime-like object into a standard datetime.datetime instance. This is used to ensure compatibility when dealing with subclasses or objects that mimic the datetime interface but require strict type matching.

Parameters

NameTypeDescription
dtdatetime.datetimeThe datetime-like object to be converted into a standard datetime instance.

Returns

TypeDescription
datetime.datetimeA standard datetime.datetime object representing the same point in time as the input.