gmtime()
public
Show source
static VALUE
time_gmtime(VALUE time)
{
struct time_object *tobj;
struct vtm vtm;
GetTimeval(time, tobj);
if (TZMODE_UTC_P(tobj)) {
if (tobj->tm_got)
return time;
}
else {
time_modify(time);
}
vtm.zone = rb_fstring_lit("UTC");
GMTIMEW(tobj->timew, &vtm);
tobj->vtm = vtm;
tobj->tm_got = 1;
TZMODE_SET_UTC(tobj);
return time;
}