method
sec
ruby latest stable - Class:
Time
sec()public
Returns the second of the minute (0..60) for time.
Note: Seconds range from zero to 60 to allow the system to inject leap seconds. See http://en.wikipedia.org/wiki/Leap_second for further details.
t = Time .now #=> 2007年11月19日 08:25:02 -0600 t.sec #=> 2
static VALUE
time_sec(VALUE time)
{
struct time_object *tobj;
GetTimeval(time, tobj);
MAKE_TM(time, tobj);
return INT2FIX(tobj->vtm.sec);
}