You have to change the function sec_rotate_last_visit: in the last insert the parameter v_time must be changed from v_time::char to v_time::varchar.
Note tha to avoid problems with ns_sendmail you also have to change the sendmail.tcl script (usually in /usr/local/aolserver/modules/tcl/sendmail.tcl) eliminating the string AOLSERVER after the HELO command.