Quite problematic. In practice we'd want to support NTP protocol, here we have VERY simple solution, and not very reliable (servers refuse to work at random).

There's some working solution in ZF: http://framework.zend.com/manual/1.12/en/zend.timesync.introduction.html
I wasn't able to finr any PHP lib and wasn't yet so desperate to dive into NTP RFC.