Why Must the Block Timestamp Be within a Certain Range of the Network Time?
The block timestamp must be close to the actual current time (usually within a few hours of the median time of the last 11 blocks) to prevent miners from manipulating the difficulty adjustment or creating blocks with future timestamps to gain an unfair advantage. Nodes will reject blocks with timestamps that are too far into the future or the past.