network-adjusted time is a decentralized way for bitcoin nodes to agree on the current time: each node calculates it as its local utc time plus the median offset from timestamps of connected peers (typically the middle value from up to 10 peers). this prevents reliance on a central server by using p2p consensusānodes share their timestamps on connection, and offsets are capped so no single bad clock can skew things more than 70 minutes from local time.
to avoid drift in block times, miners must set block timestamps greater than the median of the previous 11 blocks' times (ensuring steady progress) and no more than 2 hours ahead of their network-adjusted time (to discourage future-dating for fee grabs). inaccuracies are handled through this peer validation: invalid timestamps get rejected by nodes, and the difficulty adjustment every 2016 blocks (~2 weeks) recalibrates based on actual elapsed time versus the expected 20160 minutes, keeping the 10-minute average stable without any oracle.
bitcoin wiki
https://en.bitcoin.it/wiki/block_timestamp
learn me a bitcoin