Adding time in PHP

前端 未结 8 982
别那么骄傲
别那么骄傲 2020-12-22 10:37

I am pulling a datetime from a mysql db and i would like to add X hours to it then compare it to the current time. So far i got

$dateNow = strtotime(date(\'Y         


        
8条回答
  •  有刺的猬
    2020-12-22 11:04

    I tend to use the time() function, and this page from the manual shows them displaying the date a week in the future: http://us3.php.net/manual/en/function.time.php

提交回复
热议问题