You can look for the date code when it was bottled, usually found on the lower back or bottom of the jug on good oils. So you will know if you are getting fresh oil..
If you buy from Walmart there's a high probability it's fresh since they turn over product so quickly. The codes for the 5-qt. jugs are etched in a blank area about 3/4 down on the back label, not printed, and are a bit hard to read. My jug of 15w50 was purchased April 2nd and the codes are "11019C21A 5885". The "110" is apparently the plant code, "19C21" indicates it was bottled on March 21, 2019 ("A" is Jan., etc., with "I" probably skipped to avoid confusion with numbers), and I don't know what the "A" represents. There is an XON bottling plant very near me so that turnaround time wouldn't be surprising. The second four-digit number may be the product code.
I only have one quart bottle of 5w30 here and it has three sets of numbers quite different from above. The first set is "10118", which is probably Oct. 1, 2018 since it was purchased on Dec. 17, 2018.