PHP, subtract minutes -


i want send reminder email , don't want use cron on linux/unix/bsd boxen nor scheduled tasks on windows.

i'm trying subtract 15 mins current time.

here code far (doesn't work):

$days   = date("j",time()); $months = date("n",time()); $years  = date("y",time()); $hours  = date("g",time()); $mins   = (date("i",time())); $secs   = date("s",time()); $mins   = $mins-15; 

change date timestamp (in seconds) minus 15 minutes (in seconds) , convert date:

$date = date("y-m-d h:i:s"); $time = strtotime($date); $time = $time - (15 * 60); $date = date("y-m-d h:i:s", $time); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -