Checking to see if a day/hour/whatever has passed

I want to check if an hour has passed since the current time. When I run return (DateTime.now > (@session['user'].account_info.last_reward + 0.04))

it returns the correct value I think, but when I put that same thing (without the return) in an if statement, it tells me it can't compare a datetime and a time. Not sure how to compare them then...

I want to check if an hour has passed since the current time. When I run return (DateTime.now > (@session['user'].account_info.last_reward + 0.04))

it returns the correct value I think, but when I put that same thing (without the return) in an if statement, it tells me it can't compare a datetime and a time. Not sure how to compare them then...

You have to convert one to the other's same class.

DateTime.now.class

=> DateTime

What does this say?

(@session['user'].account_info.last_reward + 0.04).class

I think that would be Time...thanks!