add end_time to the context of template