from datetime import datetime


def update_filename_with_current_time(path_prefix: str, extension: str) -> str:
    """
    Generates a filename where the name of the file is updated based on the current time and extension
    :param path_prefix: path to prepend to the generated filename
    :param extension: file extension of the generated file
    :return str: path of the generated filename
    """
    file_name = datetime.now().strftime("{}_%Y-%m-%d_%I-%M-%S_%p.{}".format(path_prefix, extension))
    return file_name