Temperatures given in forecasts are air temperatures.
This means it should be measured away from the ground and enclosed areas etc. etc. in free circulating air.
If you held a thermometer near the ground (say, a black tarmac road surface) on a hot, sunny day - then the reading will be sky-high because the air in immediate contact with the tarmac will be extremely hot - since the black tarmac gets very hot as it absorbs the sun's energy.
It is the same principle as when people describe their garden as a "suntrap" - the action of the sun, perhaps on a south-facing wall, together with the restricted air movement caused by the enclosure by the garden, means that temperatures become elevated above that which would occur on, say, open ground 20 yards down the road at the same altitude.
Secondly, you may have heard the term "air masses". Well, air is not a good conductor of heat, so if you have a mass of cooler air sitting over the country - it will remain cool nomatter how 'sunny' it is - the sun can not heat the air directly.
Being a poor conductor, the air temperture can only rise where it is contact with the heated ground (as an example, the tarmac scenario above) - thus, it can take a great deal of time to heat up the entire air mass, especially if it is a cool, maritime air mass moving rapidly across our fair isles.
Incidentally - the air that is in contact with the warm ground will heat up and rise in 'parcels' giving rise to the fluffy cumulus clouds we see on summer days - perhaps even rain if the air is very moist !!