import time


def get_local_time_str(for_file_name=False) -> str:
    """Return current time str in the format %Y-%m-%d %H:%M:%S"""
    if not for_file_name:
        cur_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
    else:
        cur_time = time.strftime("%Y-%m-%d--%H-%M-%S", time.localtime())
    return cur_time