utc(*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
Show source
Register or log in to add new notes.