Method: Time.local
- Defined in:
- time.c
.local(year, month = 1, mday = 1, hour = 0, min = 0, sec = 0, usec = 0) ⇒ Time .local(sec, min, hour, mday, month, year, dummy, dummy, dummy, dummy) ⇒ Time
Like Time.utc, except that the returned Time object has the local timezone, not the UTC timezone:
# With seven arguments.
Time.local(0, 1, 2, 3, 4, 5, 6)
# => 0000-01-02 03:04:05.000006 -0600
# With exactly ten arguments.
Time.local(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
# => 0005-04-03 02:01:00 -0600
3768 3769 3770 3771 3772 3773 3774 3775 |
# File 'time.c', line 3768 static VALUE time_s_mktime(int argc, VALUE *argv, VALUE klass) { struct vtm vtm; time_arg(argc, argv, &vtm); return time_localtime(time_new_timew(klass, timelocalw(&vtm))); } |