instance method
in_time_zone
Ruby on Rails 2.2.3
Since v2.2.3Signature
in_time_zone(new_zone = ::Time.zone)
Returns the simultaneous time in Time.zone, or the specified zone.
Parameters
-
new_zoneopt = ::Time.zone
Source
# File activesupport/lib/active_support/time_with_zone.rb, line 61
def in_time_zone(new_zone = ::Time.zone)
return self if time_zone == new_zone
utc.in_time_zone(new_zone)
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 61
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone