You know time only gives a number of seconds, with localtime() u can get hour, min, sec and not only in numbers...
With an SQL statement you then have to update the variables into a table..
$statement="UPDATE tablename SET time=" .tosql($time,"Text");
add the where statement and query the statement..
Greetz,
Snafu