Here are a few citations from bankruptcy courts. As you could imagine, this is an uncommon occurrence, so there aren't many cases out there. However, the following support my answer based on bankruptcy code, which is federal procedure law, and is applied the same whether you're in California, New York, Illinois or Alabama:
In re Williams, 2010 Bankr. LEXIS 328 (E.D. N.Y.):
The creditor's foreclosure sale on the same day of the debtor's petition filing was a violation of the automatic stay because the debtors filed prior to the foreclosure sale.
In re Woodford, 354 B.R. 153 (W.D. KY.):
Debtors argue that because the foreclosure sale occurred the same day they filed their Chapter 13 petition, the automatic stay applies to the Property regardless of whether the petition was filed before or after the Property was auctioned. The court found that the Debtors' argument is unavailing.
In re McMeans, 209 B.R. 253 (N.D. AL.):
This cause came on to be heard on the motion for summary judgment filed by North Alabama-Bank, Inc. ("NAB") to lift the automatic stay on certain real property on the ground that the foreclosure sale on same took place prior to the filing of McMeans' petition where both events occurred on the same day. Upon due consideration of the pleadings, stipulations, affidavits, and arguments of counsel, the Court finds that there is no genuine issue of material fact in the present case and that NAB is entitled to judgment as a matter of law as NAB concluded the foreclosure sale prior to the commencement of McMeans' Chapter 11 bankruptcy case.