mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #25880 from ryandv/fix_performance_regression_in_timewithzone_to_time
Fix performance regression in `TimeWithZone#to_time`
This commit is contained in:
commit
3132fa6b7d
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ module ActiveSupport
|
|||
|
||||
# Returns a <tt>Time</tt> instance of the simultaneous time in the system timezone.
|
||||
def localtime(utc_offset = nil)
|
||||
utc.getlocal(utc_offset)
|
||||
@localtime ||= utc.getlocal(utc_offset)
|
||||
end
|
||||
alias_method :getlocal, :localtime
|
||||
|
||||
|
|
Loading…
Reference in a new issue