Returns a Time instance of the
simultaneous time in the UTC timezone.
DateTime.civil(2005,2,21,10,11,12,Rational(-6,24))# => Mon, 21 Feb 2005 10:11:12 -0600DateTime.civil(2005,2,21,10,11,12,Rational(-6,24)).utc# => Mon, 21 Feb 2005 16:11:12 UTC
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 184
def utc
utc = new_offset(0)
Time.utc(
utc.year, utc.month, utc.day,
utc.hour, utc.min, utc.sec + utc.sec_fraction
)
end