diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2017-11-15 11:25:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 11:25:53 +0000 |
commit | ebc6b171ac4b3e8c7026c18cbb115949e8f1982f (patch) | |
tree | 6494ccb2902ba386f56850e9bb264d41f365b9a6 /activesupport/lib | |
parent | 706b4bee89655bc02cc3a7ef1a6890fe7c868dec (diff) | |
parent | 2eea6458a14d99b19dffe8673015cde0800f128a (diff) | |
download | rails-ebc6b171ac4b3e8c7026c18cbb115949e8f1982f.tar.gz rails-ebc6b171ac4b3e8c7026c18cbb115949e8f1982f.tar.bz2 rails-ebc6b171ac4b3e8c7026c18cbb115949e8f1982f.zip |
Merge pull request #31128 from rails/handle-ambigious-times
Handle `TZInfo::AmbiguousTime` errors
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/values/time_zone.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index d1a2003013..b294d99fe0 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -506,7 +506,7 @@ module ActiveSupport # Available so that TimeZone instances respond like TZInfo::Timezone # instances. def period_for_local(time, dst = true) - tzinfo.period_for_local(time, dst) + tzinfo.period_for_local(time, dst) { |periods| periods.last } end def periods_for_local(time) #:nodoc: |