This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

utc

        # Time.utc

(from ruby core)
---
    Time.utc(year, month=1, day=1, hour=0, min=0, sec_i=0, usec=0) -> new_time
    Time.utc(sec_i, min, hour, day, month, year, dummy, dummy, dummy, dummy) -> new_time

---

Returns a new Time object based the on given arguments; its timezone is
UTC.

In the first form (up to seven arguments), argument `year` is required.

    Time.utc(2000)                  # => 2000-01-01 00:00:00 UTC
    Time.utc(0, 1, 2, 3, 4, 5, 6.5) # => 0000-01-02 03:04:05.0000065 UTC

In the second form, all ten arguments are required, though the last four
are ignored. This form is useful for creating a time from a 10-element
array such as is returned by #to_a.

    array = Time.now.to_a
    p array # => [57, 26, 13, 24, 4, 2021, 6, 114, true, "Central Daylight Time"]
    array[5] = 2000
    Time.utc(*array) # => 2000-04-24 13:26:57 UTC

Parameters:
*   `year`: an integer year.
*   `month`: a month value, which may be:
    *   An integer month in the range `1..12`.
    *   A 3-character string that matches regular expression
        `/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/i`.

*   `day`: an integer day in the range `1..31` (less than 31 for some
    months).
*   `hour`: an integer hour in the range `0..23`.
*   `min`: an integer minute in the range `0..59`.
*   `isec_i` is the integer number of seconds in the range `0..60`.
*   `usec` is the number of microseconds (Integer, Float, or Rational)
    in the range `0..1000000`.


Alias: Time.gm.

Related: Time.local.


(from ruby core)
---
    utc()

---

Converts *time* to UTC (GMT), modifying the receiver.

    t = Time.now   #=> 2007-11-19 08:18:31 -0600
    t.gmt?         #=> false
    t.gmtime       #=> 2007-11-19 14:18:31 UTC
    t.gmt?         #=> true

    t = Time.now   #=> 2007-11-19 08:18:51 -0600
    t.utc?         #=> false
    t.utc          #=> 2007-11-19 14:18:51 UTC
    t.utc?         #=> true


(This method is an alias for Time#gmtime.)

Converts *time* to UTC (GMT), modifying the receiver.

    t = Time.now   #=> 2007-11-19 08:18:31 -0600
    t.gmt?         #=> false
    t.gmtime       #=> 2007-11-19 14:18:31 UTC
    t.gmt?         #=> true

    t = Time.now   #=> 2007-11-19 08:18:51 -0600
    t.utc?         #=> false
    t.utc          #=> 2007-11-19 14:18:51 UTC
    t.utc?         #=> true



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.