16.
$s = $s % 10 ? "0".$s : $s;
17.
$s = $s == 0 ? $s = "00" : $s;
18.
return $s;
19.
}
20.
function normal2seconds($normal) {
21.
$hms = explode(":",$normal);
22.
$h = $hms[0]*3600;
23.
$m = $hms[1]*60;
24.
$s = $hms[2];
25.
return $h+$m+$s;
26.
}
27.
function seconds2normal($seconds) {
28.
$v = max($seconds,0);
29.
$h = h2s($v);
30.
$m = m2s($v);
31.
$s = s($s);
32.
return " $h:$m:$s";
33.
}
34.
function timePlus() {
35.
$times = func_get_args();
36.
for ($i=0;$i<count($times);$i++) {
37.
$nowtime = explode(":",$times[$i]);
38.
$time += normal2seconds(" $nowtime[0]:$nowtime[1]:$nowtime[2]"); 39.
}
40.
return seconds2normal($time);
41.