class DateTime

def formatted_offset(colon = true, alternate_utc_string = nil)

datetime.formatted_offset(false) # => "-0600"
datetime.formatted_offset # => "-06:00"
datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24))

string if the time zone is already UTC.
Returns a formatted string of the offset from UTC, or an alternative
def formatted_offset(colon = true, alternate_utc_string = nil)
  utc? && alternate_utc_string || ActiveSupport::TimeZone.seconds_to_utc_offset(utc_offset, colon)
end