In a rails app, I have model code of the form:
def do_stuff(resource)
models = Model.where(resource: resource)
operated_at = DateTime.now
models.each
DateTime.now doesn't work for comparison with Database datetime object.
Example:
DateTime.now --> Fri, 25 Oct 2013 15:28:21 -0800
Time.zone.now --> Fri, 25 Oct 2013 15:27:17 PDT -07:00