APIdock / Ruby
/
method

gm

ruby latest stable - Class: Time
gm(*args)
public

Creates a Time object based on given values, interpreted as UTC (GMT). The year must be specified. Other values default to the minimum value for that field (and may be nil or omitted). Months may be specified by numbers from 1 to 12, or by the three-letter English month names. Hours are specified on a 24-hour clock (0..23). Raises an ArgumentError if any values are out of range. Will also accept ten arguments in the order output by Time#to_a.

sec_with_frac and usec_with_frac can have a fractional part.

Time .utc (2000,"jan",1,20,15,1) #=> 2000年01月01日 20:15:01 UTC
Time .gm (2000,"jan",1,20,15,1) #=> 2000年01月01日 20:15:01 UTC
static VALUE
time_s_mkutc(int argc, VALUE *argv, VALUE klass)
{
 return time_utc_or_local(argc, argv, TRUE, klass);
}

AltStyle によって変換されたページ (->オリジナル) /