提交 bd8f0871 编写于 作者: A Andrew White

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 3132fa6b, reversing
changes made to 6949f8e5.
上级 6c1dac00
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册