It may be slightly different depending on what version you are running. Just search for $userjoindate and that should be the only place you find it.
There was a mistake in that first code, instead replace it with:
PHP Code:
$userjoindate=((time() -?($userinfo[joindate]+(($timeoffset+$bbtimezoneoffset)*3600)))?/?86400)."?days";
Still not tested though, just saw an error.