Mistři v programování na #hovnokod

Ruby #286

@timestart = MyModel.lastUpdateTime - 1.hour

day = "#{@timestart.day}"
day = "0#{day}" if day.size<2
mon = "#{@timestart.mon}"
mon = "0#{mon}" if mon.size<2

start1 = "'#{@timestart.year}-#{mon}-#{day} #{@timestart.hour}:#{@timestart.min}:#{@timestart.sec}'"
a = MyModel.find(:all, :conditions=>[ "`datetime` > #{start1}" ]

HovnoKod,