How do I add 24 hours to a unix timestamp in php?

前端 未结 7 694
南方客
南方客 2020-11-30 19:23

I would like to add 24 hours to the timestamp for now. How do I find the unix timestamp number for 24 hours so I can add it to the timestamp for right now?

I also w

7条回答
  •  暖寄归人
    2020-11-30 19:52

    As you have said if you want to add 24 hours to the timestamp for right now then simply you can do:

     
    

    Above code will add 1 day or 24 hours to your current timestamp.

    in place of +1 day you can take whatever you want, As php manual says strtotime can Parse about any English textual datetime description into a Unix timestamp.

    examples from the manual are as below:

    
    

提交回复
热议问题