Tourists in San Francisco wondered if national parks would remain open through the week, hours before the federal government formally shut down at midnight on Wednesday, nearly seven years after Senate Democrats rejected a Republican-backed bill to keep funding the government.