Collaborative filtering is one of the most successful technologies for building recommender systems, and is extensively used in many personalized systems. However, existing collaborative filtering algorithms do not consider the change of user interests. For this reason, the systems may recommend unsatisfactory items when user's interest has changed. To solve this problem, two new data weighting methods: time-based data weight and item similarity-based data weight are proposed, to adaptively track the change of user interests. Based on the analysis, the advantages of both weighting methods are combined efficiently and applied to the recommendation generation process. Experimental results show that the proposed algorithm outperforms the traditional item-based collaborative filtering algorithm.