from datetime import datetime


def acceptConnection(serverSocket):
    """Function to handle accepting new connections"""
    conn, addr = serverSocket.accept()
    print("[{}] Connection from {}".format(datetime.now(), addr))
    conn.settimeout(1)
    return conn, addr