For filter brewing the window is five to fourteen days off roast. Before that the coffee is still releasing gas; after about three weeks the flavour starts to fade.
Freshly roasted coffee gives off carbon dioxide. That gas pushes water away, the water never fully soaks the grounds, and the cup reads sour. The foam that swells during the bloom is exactly this. Do not change your settings for it — wait two or three days.
An opened bag goes flat after three or four weeks: not sour, not bitter, just dull and papery. No setting rescues that.
Sealed, cool and dark. The fridge is a bad idea — coffee takes on moisture and smells. Ground coffee loses its flavour within hours, so grind right before you brew.
A best-before date is not a roast date. A bag that will not tell you when the coffee was roasted cannot tell you when to drink it. Buy from roasters who print the date.
Fix My Coffee knows the roast date: it tells you whether the coffee is still degassing or at its peak before you brew.