Is time() guaranteed to be leap-second aware?

前端 未结 3 1692
旧巷少年郎
旧巷少年郎 2020-12-19 05:42

PHP manual states that time() returns \"the current UNIX timestamp\" ᴀ ­and microtime() returns the \"curre

3条回答
  •  轮回少年
    2020-12-19 06:16

    PHP is a serverside language. The time() function will resolve to the system time of that server. If the server is running an NTP daemon then it will be leap second aware and adjust accordingly. PHP has no knowledge of this, but the system does.

提交回复
热议问题