Method: ActiveSupport::TimeWithZone#in_time_zone

Defined in:
lib/active_support/time_with_zone.rb

#in_time_zone(new_zone = ::Time.zone) ⇒ Object

Returns the simultaneous time in Time.zone, or the specified zone.



87
88
89
90
# File 'lib/active_support/time_with_zone.rb', line 87

def in_time_zone(new_zone = ::Time.zone)
  return self if time_zone == new_zone
  utc.in_time_zone(new_zone)
end