Create Variable in PHP Equal to Current Time Minus One Hour

前端 未结 9 1313
青春惊慌失措
青春惊慌失措 2020-12-11 15:12

In PHP, how could I create a variable called $livetime that equals the current time minus 1 hour?

9条回答
  •  长情又很酷
    2020-12-11 15:38

    First convert hours into seconds (3600) then use the following:

    $your_date = date('F jS, Y',time() - 3600);
    

提交回复
热议问题