Sha256: 7530b0203aaed2087f6a9fbf48cc8f1c2f3b699d5bea41394467c51f68e4587b
Contents?: true
Size: 1.76 KB
Versions: 12
Compression:
Stored size: 1.76 KB
Contents
o:$YARD::CodeObjects::MethodObject:@scope: instance:@visibility:public: @pathI"Time#zone:EF:@parameters[:@files[[I"time.c;T0:@current_file_has_commentsF: @name: zone:@source_type:c: @tags[:@docstringIC:YARD::Docstring"�Returns the name of the time zone used for <i>time</i>. As of Ruby 1.8, returns ``UTC'' rather than ``GMT'' for UTC times. t = Time.gm(2000, "jan", 1, 20, 15, 1) t.zone #=> "UTC" t = Time.local(2000, "jan", 1, 20, 15, 1) t.zone #=> "CST";F:@objectIu:YARD::StubProxyTime#zone;F: @summary0:@ref_tags[;[o:YARD::Tags::OverloadTag :@tag_nameI" overload;F: @text0;;:@types0:@signatureI" zone;F;IC;";F;Iu;Time#zone;F;0;[;[o:YARD::Tags::Tag ;I"return;F;I";F;0;[I"String;F;0: @allI"@return [String];F;[;Iu;Time#zone;F; I""Returns the name of the time zone used for <i>time</i>. As of Ruby 1.8, returns ``UTC'' rather than ``GMT'' for UTC times. t = Time.gm(2000, "jan", 1, 20, 15, 1) t.zone #=> "UTC" t = Time.local(2000, "jan", 1, 20, 15, 1) t.zone #=> "CST" @overload zone @return [String];F:@namespaceIu; Time;F:@docstring_extra0:@sourceI"f/* * call-seq: * time.zone -> string * * Returns the name of the time zone used for <i>time</i>. As of Ruby * 1.8, returns ``UTC'' rather than ``GMT'' for UTC times. * * t = Time.gm(2000, "jan", 1, 20, 15, 1) * t.zone #=> "UTC" * t = Time.local(2000, "jan", 1, 20, 15, 1) * t.zone #=> "CST" */ static VALUE time_zone(VALUE time) { struct time_object *tobj; GetTimeval(time, tobj); MAKE_TM(time, tobj); if (TIME_UTC_P(tobj)) { return rb_str_new2("UTC"); } if (tobj->vtm.zone == NULL) return Qnil; return rb_str_new2(tobj->vtm.zone); };F
Version data entries
12 entries across 12 versions & 2 rubygems