Cooked food can only stay in the temperature danger zone for so long before it becomes unsafe to eat. Havern explains: "The maximum amount of time perishable foods can [spend] in the danger zone is two hours. At two hours, the food must be consumed, stored correctly, or thrown away.