Add log_task() log all tasks to database, update format_time