Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不知道如何将秒数添加到当前时间。这是我节省时间的代码。
$timereg = date("g:i:s A", time());
例如时间正好是 9:30:00
我只想让它 9:30:02,就像那样。
那么你可以做
$timereg = date("g:i:s A", time() + 2);
而且我相信它会显示当前时间+2秒。