Method: Time#getutc
- Defined in:
- time.c
#getutc ⇒ Time
Returns a new Time object representing the value of self converted to the UTC timezone:
local = Time.local(2000) # => 2000-01-01 00:00:00 -0600
local.utc? # => false
utc = local.getutc # => 2000-01-01 06:00:00 UTC
utc.utc? # => true
utc == local # => true
4301 4302 4303 4304 4305 |
# File 'time.c', line 4301 static VALUE time_getgmtime(VALUE time) { return time_gmtime(time_dup(time)); } |