It is even easier to step back and sell your food.
I bet it would be even easier to cheat with this mechanic.
The game is unlikely to track the dates for every food item on the map.
Technically the most likely solution would be to start the food spoiling when you have it in your inventory which means throwing it away should do the trick.
If it wasn't, the process would start as soon as food was in the player's inventory. Which again means you just don't pick up food when you don't need it.
Spoilage couldn't be global because at some point the player would only find spoiled food.