From: ts Date: 2001-02-23T19:32:46+09:00 Subject: [ruby-talk:11369] Re: Time without seconds... >>>>> "K" == Kevin Smith writes: K> class MyTime < Time K> def MyTime.createFloor K> t = Time.new K> return Time.at(t.to_i() - t.sec) K> end K> end K> t = MyTime.createFloor K> p t.inspect Warning you can have a problem pigeon% /usr/bin/ruby class MyTime < Time def MyTime.createFloor t = Time.new return Time.at(t.to_i() - t.sec) end def toto puts "toto" end end t = MyTime.createFloor p t.inspect p t.type t.toto "Fri Feb 23 11:29:00 CET 2001" Time ^D -:13: undefined method `toto' for Fri Feb 23 11:29:00 CET 2001:Time (NameError) pigeon% See that t is a Time object and not a MyTime object. Guy Decoux