PHP:将时间添加到时间戳
发布时间:2020-12-13 13:40:42 所属栏目:PHP教程 来源:网络整理
导读:在给定UTC时间戳的 PHP中,我想添加N个年数.这应该考虑到闰年. 谢谢. $newTimestamp = strtotime('+2 years',$timestamp); 根据需要更换“2年”. 参考:http://php.net/manual/en/function.strtotime.php
在给定UTC时间戳的
PHP中,我想添加N个年数.这应该考虑到闰年.
谢谢. $newTimestamp = strtotime('+2 years',$timestamp); 根据需要更换“2年”. 参考:http://php.net/manual/en/function.strtotime.php (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |