method

sec

ruby latest stable - Class: DateTime

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

sec()
public

Returns the second (0-59).

DateTime.new(2001,2,3,4,5,6).sec          #=> 6