Compatible with nil time_end