Diesel doesn't go bad unless there is stuff growing in it. 2 years or 20 years old, no issues. Gasoline in a modern fuel injected engine with a well sealed fuel system can last 5 to 10 years. That's from personal experience with numerous cars in storage.