提交 70af7efa 编写于 作者: S Santiago Pastorino 提交者: José Valim

Don't store incorrect values in zones_map backport

[#4942 state:committed]
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 56b35afb
......@@ -387,7 +387,9 @@ def zones_map
def [](arg)
case arg
when String
zones_map[arg] ||= lookup(arg)
if tz = lookup(arg)
zones_map[arg] ||= tz
end
when Numeric, ActiveSupport::Duration
arg *= 3600 if arg.abs <= 13
all.find { |z| z.utc_offset == arg.to_i }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册