def datetime_to_epoch(self, dt):
    '\n        Converts a Python datetime to a CDF Epoch value\n\n        Parameters\n        ==========\n        dt : :class:`datetime.datetime`\n            date and time to convert\n\n        Returns\n        =======\n        out : float\n            epoch corresponding to dt\n\n        See Also\n        ========\n        v_datetime_to_epoch\n        '
    if ((dt.tzinfo != None) and (dt.utcoffset() != None)):
        dt = (dt - dt.utcoffset())
    dt.replace(tzinfo=None)
    micro = (dt.microsecond % 1000)
    if ((micro >= 500) and (dt.year < 9999)):
        dt += datetime.timedelta(0, 0, 1000)
    return self._library.computeEPOCH(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, int((dt.microsecond / 1000)))
Converts a Python datetime to a CDF Epoch value

Parameters
==========
dt : :class:`datetime.datetime`
    date and time to convert

Returns
=======
out : float
    epoch corresponding to dt

See Also
========
v_datetime_to_epoch
def datetime_to_epoch(self, dt):
    '\n        Converts a Python datetime to a CDF Epoch value\n\n        Parameters\n        ==========\n        dt : :class:`datetime.datetime`\n            date and time to convert\n\n        Returns\n        =======\n        out : float\n            epoch corresponding to dt\n\n        See Also\n        ========\n        v_datetime_to_epoch\n        '
    if ((dt.tzinfo != None) and (dt.utcoffset() != None)):
        dt = (dt - dt.utcoffset())
    dt.replace(tzinfo=None)
    micro = (dt.microsecond % 1000)
    if ((micro >= 500) and (dt.year < 9999)):
        dt += datetime.timedelta(0, 0, 1000)
    return self._library.computeEPOCH(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, int((dt.microsecond / 1000)))