Sha256: b6b87f1da7d8b8ff10e40f4f15ba32844f0daa41cd675a257d9aac9fc6a6badb

Contents?: true

Size: 1.92 KB

Versions: 12

Compression:

Stored size: 1.92 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:localtime:@docstringIC:YARD::Docstring"Converts <i>time</i> to local time (using the local time zone in
effect for this process) modifying the receiver.

   t = Time.gm(2000, "jan", 1, 20, 15, 1)
   t.gmt?        #=> true
   t.localtime   #=> Sat Jan 01 14:15:01 CST 2000
   t.gmt?        #=> false
:@objectu:YARD::StubProxyTime#localtime:
@summary0:	@all"*Converts <i>time</i> to local time (using the local time zone in
effect for this process) modifying the receiver.

   t = Time.gm(2000, "jan", 1, 20, 15, 1)
   t.gmt?        #=> true
   t.localtime   #=> Sat Jan 01 14:15:01 CST 2000
   t.gmt?        #=> false


@overload localtime
  @return [Time]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Time#localtime;;;IC;	"
;
u;Time#localtime;0;
"@return [Time];[;[o:YARD::Tags::Tag
;
0;0:@types["	Time:
@text":@tag_name"return;0:@parameters[;0:@signature"localtime;"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["time.c0:@namespaceu;	Time:
@path"Time#localtime;[:@visibility:public:@source"'/*
 *  call-seq:
 *     time.localtime => time
 *  
 *  Converts <i>time</i> to local time (using the local time zone in
 *  effect for this process) modifying the receiver.
 *     
 *     t = Time.gm(2000, "jan", 1, 20, 15, 1)
 *     t.gmt?        #=> true
 *     t.localtime   #=> Sat Jan 01 14:15:01 CST 2000
 *     t.gmt?        #=> false
 */

static VALUE
time_localtime(time)
    VALUE time;
{
    struct time_object *tobj;
    struct tm *tm_tmp;
    time_t t;

    GetTimeval(time, tobj);
    if (!tobj->gmt) {
    if (tobj->tm_got)
        return time;
    }
    else {
    time_modify(time);
    }
    t = tobj->tv.tv_sec;
    tm_tmp = localtime(&t);
    if (!tm_tmp)
    rb_raise(rb_eArgError, "localtime error");
    tobj->tm = *tm_tmp;
    tobj->tm_got = 1;
    tobj->gmt = 0;
    return time;
}:@source_type:c

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Time/localtime_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Time/localtime_i.dat