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

前端 未结 3 1691
旧巷少年郎
旧巷少年郎 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:02

    time() just returns the UNIX-Timestamp. This means, that it is not affected by leap seconds (and such), because you will never "lose" time, just because someone decided it. Only textual representations (e.g. created using date()) are affected.

提交回复
热议问题