How to Subtract Minutes

后端 未结 12 963
情书的邮戳
情书的邮戳 2020-12-15 15:48

I want to send a reminder email.I don\'t want to use cron on Linux/Unix/BSD box or Scheduled Tasks on Windows.

I\'m trying to subtract 15 minutes from t

12条回答
  •  -上瘾入骨i
    2020-12-15 16:15

    To subtract 15 minutes from the current time, you can use strtotime():

    $newTime = strtotime('-15 minutes');
    echo date('Y-m-d H:i:s', $newTime);
    

提交回复
热议问题