how long does it take to spoil