The time it takes for melanin to rise to the skin’s surface after production has been stimulated takes around 12 hours. A suntan is not at all a high degree of sun protection as it is only what could be rated as about an SPF3 sunscreen.
When the skin is overexposed to UV radiation there is not enough time for the body to react and the result is sunburn.
By following safe sun protection practices, a suntan can be built up and will extend the period one can stay in the sun by an SPF3. However if the resulting skins UV index changes then the natural SPF will not help much.