The block reward is halved based on the number of blocks in the chain, not on time. The number of blocks per hour the Bitcoin mining network produces depends on the network hashing power and the network difficulty. More hashing power will produce more blocks per hour, so the network adjusts the difficulty to try to make blocks appear at an average rate of 6 block per hour (1 block every 10 minutes). The difficulty is adjusted
every 2016 blocks, which means that if more hashing power is added to the network after a difficulty change, blocks will appear more often than once every 10 minutes and if hashing power leaves the network, blocks will appear less ofter.
So, when people say that the next reward halving will
approximately occur in 2017, they are assuming that blocks will be created at the rate of 6 per hour. That assumption isn't guaranteed to be correct because the network hashing power is variable. It is guaranteed and certain that the next reward halving will occur at block
420000, but the exact date and time that block will be added to the chain is not certain.