D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Time
/
Filename :
utc-c.ri
back
Copy
U:RDoc::AnyMethod[iI"utc:ETI"Time::utc;TT:publico:RDoc::Markup::Document:@parts[#o:RDoc::Markup::Paragraph; [I"?Returns a new +Time+ object based the on given arguments, ;TI"in the UTC timezone.;To:RDoc::Markup::BlankLine o; ; [I"(With one to seven arguments given, ;TI"Jthe arguments are interpreted as in the first calling sequence above:;T@o:RDoc::Markup::Verbatim; [I"OTime.utc(year, month = 1, mday = 1, hour = 0, min = 0, sec = 0, usec = 0) ;T:@format0o; ; [I"Examples:;T@o;; [I"2Time.utc(2000) # => 2000-01-01 00:00:00 UTC ;TI"3Time.utc(-2000) # => -2000-01-01 00:00:00 UTC ;T; 0o; ; [I"NThere are no minimum and maximum values for the required argument +year+.;T@o; ; [I" For the optional arguments:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I":+month+: Month in range (1..12), or case-insensitive ;TI"3-letter month name:;T@o;; [ I"8Time.utc(2000, 1) # => 2000-01-01 00:00:00 UTC ;TI"8Time.utc(2000, 12) # => 2000-12-01 00:00:00 UTC ;TI"8Time.utc(2000, 'jan') # => 2000-01-01 00:00:00 UTC ;TI"8Time.utc(2000, 'JAN') # => 2000-01-01 00:00:00 UTC ;T; 0o;;0; [o; ; [I"'+mday+: Month day in range(1..31):;T@o;; [I"8Time.utc(2000, 1, 1) # => 2000-01-01 00:00:00 UTC ;TI"8Time.utc(2000, 1, 31) # => 2000-01-31 00:00:00 UTC ;T; 0o;;0; [o; ; [I"F+hour+: Hour in range (0..23), or 24 if +min+, +sec+, and +usec+ ;TI"are zero:;T@o;; [I";Time.utc(2000, 1, 1, 0) # => 2000-01-01 00:00:00 UTC ;TI";Time.utc(2000, 1, 1, 23) # => 2000-01-01 23:00:00 UTC ;TI";Time.utc(2000, 1, 1, 24) # => 2000-01-02 00:00:00 UTC ;T; 0o;;0; [o; ; [I"$+min+: Minute in range (0..59):;T@o;; [I">Time.utc(2000, 1, 1, 0, 0) # => 2000-01-01 00:00:00 UTC ;TI">Time.utc(2000, 1, 1, 0, 59) # => 2000-01-01 00:59:00 UTC ;T; 0o;;0; [o; ; [I"=+sec+: Second in range (0..59), or 60 if +usec+ is zero:;T@o;; [I"ATime.utc(2000, 1, 1, 0, 0, 0) # => 2000-01-01 00:00:00 UTC ;TI"ATime.utc(2000, 1, 1, 0, 0, 59) # => 2000-01-01 00:00:59 UTC ;TI"ATime.utc(2000, 1, 1, 0, 0, 60) # => 2000-01-01 00:01:00 UTC ;T; 0o;;0; [o; ; [I".+usec+: Microsecond in range (0..999999):;T@o;; [I"HTime.utc(2000, 1, 1, 0, 0, 0, 0) # => 2000-01-01 00:00:00 UTC ;TI"OTime.utc(2000, 1, 1, 0, 0, 0, 999999) # => 2000-01-01 00:00:00.999999 UTC ;T; 0o; ; [I"The values may be:;T@o;;;;[o;;0; [o; ; [I"Integers, as above.;To;;0; [o; ; [I"&Numerics convertible to integers:;T@o;; [I"CTime.utc(Float(0.0), Rational(1, 1), 1.0, 0.0, 0.0, 0.0, 0.0) ;TI""# => 0000-01-01 00:00:00 UTC ;T; 0o;;0; [o; ; [I"String integers:;T@o;; [I"a = %w[0 1 1 0 0 0 0 0] ;TI"3# => ["0", "1", "1", "0", "0", "0", "0", "0"] ;TI"/Time.utc(*a) # => 0000-01-01 00:00:00 UTC ;T; 0o; ; [I"+When exactly ten arguments are given, ;TI"Kthe arguments are interpreted as in the second calling sequence above:;T@o;; [I"MTime.utc(sec, min, hour, mday, month, year, dummy, dummy, dummy, dummy) ;T; 0o; ; [I"-where the +dummy+ arguments are ignored:;T@o;; [I"(a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] ;TI")# => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] ;TI"/Time.utc(*a) # => 0005-04-03 02:01:00 UTC ;T; 0o; ; [I"HThis form is useful for creating a +Time+ object from a 10-element ;TI"!array returned by Time.to_a:;T@o;; [I"Kt = Time.new(2000, 1, 2, 3, 4, 5, 6) # => 2000-01-02 03:04:05 +000006 ;TI"?a = t.to_a # => [5, 4, 3, 2, 1, 2000, 0, 2, false, nil] ;TI"/Time.utc(*a) # => 2000-01-02 03:04:05 UTC ;T; 0o; ; [I"=The two forms have their first six arguments in common, ;TI"!though in different orders; ;TI"Qthe ranges of these common arguments are the same for both forms; see above.;T@o; ; [I"DRaises an exception if the number of arguments is eight, nine, ;TI"or greater than ten.;T@o; ; [I"Related: Time.local.;T: @fileI"time.c;T:0@omit_headings_from_table_of_contents_below0I"�Time.utc(year, month = 1, mday = 1, hour = 0, min = 0, sec = 0, usec = 0) -> new_time Time.utc(sec, min, hour, mday, month, year, dummy, dummy, dummy, dummy) -> new_time ;T0[[I"gm;T@ I"(*args);T@�FI" Time;TcRDoc::NormalClass00