Revert "Merge pull request #25880 from ryandv/fix_performance_regression_in_timewithzone_to_time"
Turns out trying to cache on localtime with arguments is too hard so we'll do it on DateAndTime::Compatibility#to_time instead. This reverts commit 3132fa6b7d9585e04eb44b25b55d298391b040b5, reversing changes made to 6949f8e5e7dc901d4e04ebab6c975afb33ca44c9.
This commit is contained in:
parent
6c1dac00df
commit
bd8f0871c2
@ -80,7 +80,7 @@ def in_time_zone(new_zone = ::Time.zone)
|
||||
|
||||
# Returns a <tt>Time</tt> instance of the simultaneous time in the system timezone.
|
||||
def localtime(utc_offset = nil)
|
||||
@localtime ||= utc.getlocal(utc_offset)
|
||||
utc.getlocal(utc_offset)
|
||||
end
|
||||
alias_method :getlocal, :localtime
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user