import time


def localtime_filepath(directory, extension):
    """
    Generates a filepath of current local time, with given extension.

    directory -- Path
    extension -- str

    Returns -- str
    """
    formatted_current_time = time.strftime('%H.%M.%S', time.localtime())
    return str(directory / str(formatted_current_time + '.' + extension))