note 102675 modified in function.strtotime by danbrown

From: Date: Mon, 28 Feb 2011 14:34:51 +0000
Subject: note 102675 modified in function.strtotime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-177393@lists.php.net to get a copy of this message
Function to add duration to time <?php function addTime($start_time, $duration) { list($dhrs, $dmin, $dsec) = explode(':',$duration); return date('H:i:s', strtotime($start_time.' '.'+'.$dhrs.' hours,'. $dmin.' minutes,' .$dsec. ' seconds')); } ?> --was-- Function to add duration to time function addTime($start_time, $duration) { list($dhrs, $dmin, $dsec) = explode(':',$duration); return date('H:i:s', strtotime($start_time.' '.'+'.$dhrs.' hours,'. $dmin.' minutes,' .$dsec. ' seconds')); } http://php.net/manual/en/function.strtotime.php

« previous php.notes (#177393) next »