You would have to store the time somewhere, e.g. in a database, then check it against the current time.
PHP Code:
$then = time() + ($hours*60*60); // figure out what time they're returning
$DB_site->query("INSERT INTO time (time) VALUES ($then)"); // put it in the db
// grab their return time in both timestamp and human-readable
$time = $DB_site->query("SELECT time,FROM_UNIXTIME(time) AS returns FROM time");
if (time() < $time['time']) {
// user is away - show when they'll be back
echo "User is away and will return at " . $time['returns'] .".";
} else {
//user is not away
"User is present";
}
or something like that.
See?