(datetime_obj)
return int(time.mktime(datetime_obj.timetuple()))
Returns the timestamp as an int for the given datetime object

    >>> get_timestamp(datetime(2011, 4, 7, 9, 30, 6))
    1302168606

    >>> get_timestamp(datetime(1970, 1, 1, 0, 0, 0))
    0
Returns the timestamp as an int for the given datetime object
Returns the timestamp as an int for the given datetime object
def get_timestamp(datetime_obj):
    """Returns the timestamp as an int for the given datetime object

    >>> get_timestamp(datetime(2011, 4, 7, 9, 30, 6))
    1302168606

    >>> get_timestamp(datetime(1970, 1, 1, 0, 0, 0))
    0
    """
    return int(time.mktime(datetime_obj.timetuple()))
def get_timestamp ( datetime_obj ) : return int ( time . mktime ( datetime_obj . timetuple ( ) ) )