San Francisco ranks worst for late-night dining in the U.S., analysis finds

San Francisco is known for its culinary flare, widely recognized as one of the best cities for food in the country. But if you’re among those who enjoy late-night dining, finding midnight grub will likely be a challenge.

A new report said San Francisco has among the earliest restaurant closing times in the world.

The analysis by online food magazine Chef’s Pencil found the average final seating time in the City by the Bay was 9 p.m.

That’s the earliest of any major U.S. city and "substantially lower than its American peers," according to the review.

Worldwide, San Francisco's average tied for the third earliest.

SEE ALSO: Popular Mediterranean, Spanish restaurant closes in Oakland

Only Luxembourg and Auckland, New Zealand had earlier closing times: 8:45 p.m. and 8:30 p.m. respectively.

In the U.S., Miami and Las Vegas ranked the best for late-night dining, with the average last seating time clocking in at 10:30 p.m. 

They closed later than New York City, known as "The City that Never Sleeps," which had an average closing time of 10 p.m. Houston also had a 10 p.m. closing time. 

Washington, D.C., Los Angeles, and Chicago followed, all with average last seating times of 9:45 p.m.

In North America, the city that ranked as the best for grabbing a late-night meal was Mexico City, which had 11 p.m. as the average time for last food orders. 

Around the globe, Chef's Pencil ranked Cairo, Egypt as the best place for those looking to book a dinner well into the night. "The average last seating time is midnight, making Cairo the world’s capital of late dining," researchers said.

The analysis reviewed the booking calendars of more than 4,400 restaurants in almost 90 cities worldwide and looked at establishments' last seating or last food order times on weekends.