utc()
public
Show source
static VALUE
time_gmtime(VALUE time)
{
struct time_object *tobj;
struct vtm vtm;
GetTimeval(time, tobj);
if (TIME_UTC_P(tobj)) {
if (tobj->tm_got)
return time;
}
else {
time_modify(time);
}
if (!gmtimew(tobj->timew, &vtm))
rb_raise(rb_eArgError, "gmtime error");
tobj->vtm = vtm;
tobj->tm_got = 1;
TIME_SET_UTC(tobj);
return time;
}