method

tv_sec

v1_8_7_330 - Show latest stable - Class: Time
tv_sec()
public

Returns the value of time as an integer number of seconds since epoch.

t = Time.now
"%10.5f" % t.to_f   #=> "1049896564.17839"
t.to_i              #=> 1049896564