I am attempting to pull tweets from twitter and store them in an sqlite db. In order to prevent duplication I wish to ignore tweets where the user开发者_如何学Python AND the time created already exist in the DB. So my code is
if Tweet.exists?(['twitter_created_at = ? AND from_user_id_str = ?', (tweet_results.created_at), tweet_results.from_user_id_str])
Now, through taking out the user_id parts i can tell that the problem is with the comparison between
twitter_created_at
tweet_results.created_at
I have been in the debugger and seen that the dates do match but i cannot get the statement to come back true.
thanks in advance.
精彩评论