Petrol expands as it gets warmer, and it expands a lot: 950 parts per million per kelvin rise in temperature. This may not seem like a lot, but you might be surprised.
Energy is released when petrol is burnt because the energy required to break the bonds between the carbon and hydrogen atoms in the petrol is less than the energy released when new bonds are formed between the carbon and hydrogen and the oxygen atoms from the air. See, for example, the combustion of octane (one of the main components of petrol) shown below.
This means that the amount of energy released by burning petrol depends on the number of atoms in the petrol, and therefore on the petrol’s mass, but you pay for petrol by the litre. You use mass but pay for volume.
Imagine buying petrol on a day when there is a fifteen degree Celsius difference in temperature between morning and afternoon; the petrol will expand by 14250 parts per million. One litre of petrol bought in the morning will expand to 1.014 litres in the afternoon. This means that the same amount of energy will cost you 1.43% more if you buy it in the afternoon rather than in the morning.
This is all a bit of a moot point, as petrol is stored in large underground tanks, and the temperature underground is a lot more stable than the temperature above ground. Perhaps you’d be better stockpiling petrol in the winter when ground temperatures are lower.
* Breaking eighteen carbon-hydrogen bonds, seven carbon-carbon bonds and twenty-five oxygen-oxygen double bonds requires (18×413)+(7×348)+(25×498) = 22320 kJ. Forming thirty-two carbon-oxygen double bonds and thirty-six hydrogen-oxygen bonds releases (32×360)+(36×459) = 28044 kJ.