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.
我有两个时间戳:一个来自time()函数,另一个在前端选择用户。我需要比较这两个时间戳,但忽略秒或将其设置为 00。这样做的正确方法是什么?
time()
有时间举个例子:
$nr = 1111111122; $nr = substr($nr, 0, strlen($nr)-2) . "00";
echo strtotime(date('Ymd H:i:00', time()));