I'm using PHP and need to do som开发者_开发百科e time based actions. I have 2 servers set up on two different machines. However both system clocks are different. I ended up setting both clocks to same time, a trivial task but Is there a PHP method which returns the time independent of the system clock?
Thanks in advance.
As far as PHP (and OS) is concerned, system time is the time. There is no other "independent" time the computer knows about. If you really do not trust the clock of your own system, you might want to fetch it across the network from some other machine. NTP synchronization daemon will do it for you on OS level, by the way.
精彩评论