method

tv_sec

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

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

t = Time.now
"%10.5f" % t.to_f   #=> "1270968656.89607"
t.to_i              #=> 1270968656