No. A part-time Class D surface area may become either a Class E surface area or Class G airspace when its published period ends. The FAA Aeronautical Information Manual points pilots to the airport's entry in the Chart Supplement for the applicable times and what the surface area becomes. You must identify that status for the actual flight location and time. A closed tower, unlit building or quiet airport does not establish that a drone can fly without prior airspace authorization.

Read the airport-specific entry
Start with the correct airport name and identifier, especially near a town with a regional airport and a separate municipal field. Locate its listing in the current FAA Chart Supplement. Look for the published Class D effective hours and the statement that describes the airspace at other times. Also check FAA notices for temporary changes. Avoid inferring the airspace status from a flight-tracking screen showing no recent arrivals or from a photograph of the control tower.
Read times with care. If the entry uses UTC, convert both the date and hour to local time for your flight location. A person planning an evening flight may be looking at the following day in UTC. Use the full intended operating interval, including the landing. A time change during the planned flight can matter even if the aircraft takes off under one classification and returns only a few minutes later.
Class E at the surface has consequences
Under Part 107, a pilot needs prior ATC authorization in Class B, C or D airspace and within the lateral boundaries of the surface area of Class E airspace designated for an airport. The recreational exception has corresponding requirements for these areas. If the Chart Supplement says the part-time Class D changes to the applicable Class E surface area, the mere fact that tower personnel have gone home does not remove that authorization requirement.
If the entry instead identifies Class G, check the level where overlying controlled airspace begins and the entire intended route. The surrounding area may contain another airport's controlled airspace, a temporary restriction or a separate obstacle to lawful flight. A classification answers one question about one volume of air. The FAA's other requirements, including giving way to crewed aircraft and avoiding interference with airport operations, continue to matter.

Plan for traffic when the tower is closed
An airport may still receive aircraft outside tower operating hours. Traffic can arrive from directions a drone pilot on the ground does not anticipate. Select an operating area that keeps well clear of approaches, departures and the traffic pattern. If you see or hear an aircraft that could conflict, give way and land when needed to avoid interference. A timetable gives you no assurance that the sky is empty.
An evening or night operation also has its own visibility, lighting and other applicable requirements. Confirm those separately from the airspace question. If the airport entry is unclear or conditions differ from what you planned, choose another time or place. Taking a photo from the ground while you resolve the published status is a simpler decision than relying on the closing time of a building.