Fix type errors in format strings in hosts_db and use time_t instead of long.