succ

time.succ â new_time
Instance Public methods

Returns a new Time object, one second later than time. #succ is obsolete since 1.9.2 for time is not a discrete value.

t = Time.now       #=> 2007-11-19 08:23:57 -0600
t.succ             #=> 2007-11-19 08:23:58 -0600

Use instead time + 1

t + 1              #=> 2007-11-19 08:23:58 -0600
doc_ruby_on_rails
2015-05-17 21:24:21
Comments
Leave a Comment

Please login to continue.