Method: ActiveSupport::TimeZone#<=>

Defined in:
activesupport/lib/active_support/values/time_zone.rb

#<=>(zone) ⇒ Object

Compare this time zone to the parameter. The two are compared first on their offsets, and then by name.



333
334
335
336
337
338
# File 'activesupport/lib/active_support/values/time_zone.rb', line 333

def <=>(zone)
  return unless zone.respond_to? :utc_offset
  result = (utc_offset <=> zone.utc_offset)
  result = (name <=> zone.name) if result == 0
  result
end