Bitcoin blocks are on average, 10 minutes intervals and difficulty is adjusted to achieve this. But however, variance can cause blocks to be seconds apart or even hours apart. Miners can choose their time stamp. It is valid if it is greater than the median time of the previous 11 blocks and less than 2 hours from the network adjusted time.
"Network-adjusted time" is the median of the timestamps returned by all nodes connected to you.
from
https://en.bitcoin.it/wiki/Block_timestamp