That is because Spain (except the Canary Islands) is in the wrong time zone. Madrid is on a similar line of longitude to Swansea in Wales. Its clocks are set to Central European Time, the same as Warsaw or Tirana, some 24 degrees or 2,000kms (1,200 miles) to the east. Spanish time is a historical anomaly.