Method: Time#to_s
- Defined in:
- time.c
permalink #to_s ⇒ String
4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 |
# File 'time.c', line 4361
static VALUE
time_to_s(VALUE time)
{
struct time_object *tobj;
GetTimeval(time, tobj);
if (TZMODE_UTC_P(tobj))
return strftimev("%Y-%m-%d %H:%M:%S UTC", time, rb_usascii_encoding());
else
return strftimev("%Y-%m-%d %H:%M:%S %z", time, rb_usascii_encoding());
}
|