In this paper we present numerical solutions for thermal boundary layers that are developed during forced convection in a porous medium located above a flat plate. The basic feature of such layers is that they are nonsimilar. In our study we consider thermal nonequilibrium between the two phases. Accordingly, each phase is endowed with its own energy equation. The boundary-layer equations are solved with the local nonsimilarity method. We examine convection of air and liquid water, while the solid matrix is supposed to be made of cast iron. According to our computations, there are significant differences between the temperature distributions of the two phases, especially at short and moderate distances from the edge of the flat plate. Also, due to the high conductivity of the solid matrix, the thermal boundary layers are much thicker than the hydrodynamic one. The profile of the local Nusselt number is quite sensitive on the Prandtl number and only far downstream it scales with the square root of the distance. Finally, the validity of the local thermal equilibrium assumption is assessed via a comparative study. According to it, this assumption leads to significant inaccuracies in the temperature profiles but yields reasonable estimates for the thickness of the thermal boundary layer of the fluid.