When gasoline is properly stored in a sealed approved gasoline can or container the stored gasoline will last for up to 6 months before it goes bad.
After 6 months the gasoline gets to the point of where it wants to turn to varnish and then the longer it sits the gasoline also starts to lose it's octane and ability to combust in the engine.
If you store gasoline for emergencies I would recommend using the stored gasoline in your vehicle, lawnmower etc at least after a few months.
Then put fresh gasoline into those containers again so that the gasoline always remains fresh.
You can add some Stabil to the gasoline to help keep the gasoline fresh but even then the gasoline still eventually degrades.
I notice after 3 months my stored gasoline starts smelling different and so I use it in my lawnmower or car or truck and then fill the gas can back up with fresh gasoline.