某个时间的前一天12点, 怎么用PHP算出来
某个时间为变量。
<?phpdate_default_timezone_set('PRC');$now = time(); //某个时间,可以是任意时间戳$ago = strtotime('-1 day 12:00:00', $now); //一天前的12:00:00的时间戳,两天前-2 day即可echo date('Y-m-d H:i:s', $ago);
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号