Change the time of a process or group of processes by writing a new time to the time file.

def change_time(filename, newtime):
    """Change the time of a process or group of processes by writing a new time to the time file."""
    with open(filename, "w") as faketimetxt_handle:
        faketimetxt_handle.write("@" + newtime.strftime("%Y-%m-%d %H:%M:%S"))