To answer the question, financial statements are usually made public between 6 to 8 weeks after the period ends. It takes some time to compile, audit, and release these statements, so you won't find the earnings for September available on October 1. To see when a specific company released their financial reports, you can look either on their website (typically under "investor information") or search for them on EDGAR.
The typical way to calculate historical P/E is to use the average of the trailing 12 months of earnings per share and divide it by the last price of that period. Obviously this price does not have all of the actual data, but many companies give broad outlooks that help analysts predict what the earnings will be.
The reason that this timing is not critical for investing, though, is because the price of a stock does not depend on what is earned in the prior period(s), but what it is expected to earn in future periods. A forward-looking P/E is more important for investment decisions. Certainly prior financials can be an indicator of future performance, but knowing the exact earnings the day after the period ends should not be critical.
A historical P/E may be a quick indicator of whether or not a company might be "cheap" or "expensive" compared to other companies, but it should not be used for investing decisions.