時間の違いを見つける方法、たとえば、予定の時間は
午後 4 時 30 分ですが、cron ジョブで 30 分、15 分、または 5 分で通知を送信したい
午後4時30分まで
しかし、30分に設定されている場合、メールが午後4時に送信される場合に通知するifステートメントを作成できるように、時差を取得する方法がわかりません
元:
$setting = "30 minute";//set to notify 30 min before appointment
$notiftime = "4:30 PM";//time of the appointment
$notiftime = strtotime($notiftime);
$difference = strtotime( '-' $setting , $notiftime);
$current = date('h:ia'); //gets current time
$current = strtotime($current);
if ( $current <= $difference){
//send email script=======
}