The Spanish have a reputation for doing things late in the day, especially eating really late in the evening and starting nights out after midnight. Midday in Spanish, Mediodía, is around 3pm, which says a lot. I know that one reason Spaniards might do things late is because Spain is in the 'wrong' time zone with respect to the position of the sun. There's also the the fact that the actual middle of the day in the summer is often too hot to do anything (requiring the siesta) so naturally activity migrates to the cooler evening.
My question is whether Spaniards have been nightowls for a long time (100s of years), or whether some of this behaviour is more recent (because of the creation of international time zones, for instance, or other aspects of industrial modernity).
This is an entirely recent phenomenon, from the XX century to be precise.
Ordinarily, prior to modernity, people would proceed with their lives according to the sunlight hours, as there was no efficient way of having sufficient lighting at night. Each town, village, city, or hamlet would have its own time system, based on the solar movement, which would produce minor variations from one place to the next, but rather large on a national scale. As modernity eventually came, and with her came the trains, the national government needed to have some coherence throughout the country, and that is why on January the 1st 1901 it was enacted that the official hour was that of Greenwich, and the official calculations would come from the Navy's Observatory in San Fernando. People, however, would go with their daily businesses at the used times, and having lunch would be something happening at one post meridiem, as mentioned in cookbooks like "La Cocina Práctica" by Picadillo.
The switch in the hourly customs of spaniards came with a certain Francisco Franco, who put Spain in the Central European Time Zone on March the 15th of 1940. That is the day when everything changed and everything stayed the same. Why chose the Berlin hour? To be more in line with the Reich, and let's not forget that by that point in time Hitler was winning the war, and Franco was somehow trying to curry in favour from Hitler, whom he was unofficially helping, Spain being non-belligerent in the Second World War.
With this change, the official hours of everything changed in order to be more adapted to the solar hours, and not the actual official time. So, since then Spain is very odd in clock hours, but coherent with the sunlight hours.
Martín Olalla, in an academic paper from 2014 analysed all of this and pointed out that the time schedules of the activities surveyed in the polls we have analysed vary mainly due to the natural effect of the apparent revolution of the Sun around the Earth. All the statistics analysed, with the exceptions of job starting and dinner time, are situated in a bend of one solar hour. So, the Spanish time schedules are already adapted to the current time zone, and so the Spanish regions perform their activities at hours that are fully compatible with the Sun's position, though nominally late and abnormal, and comparable to the timeframes at which they are performed in Italy or Great Britain. He also notes that though Spain may observe the Central European Time, fifteen degrees East of its actual geographic position, performs its activities according to its meridian, that is West European Time. This is to mean that Spain does not live under a permanent jet lag.