import time


def datetime_to_timestamp(a_date):
    """Transform a datetime.datetime to a timestamp
    microseconds are lost !
    :type a_date: datetime.datetime
    :rtype: float
    """
    return time.mktime(a_date.timetuple())