From 52b57c662c129d72d44fa1ab9920a752c1973482 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Tue, 11 Mar 2008 04:26:20 +0000 Subject: TimeWithZone instances correctly enforce DST rules. Adding TimeZone#period_for_utc git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/values/time_zone.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport/lib/active_support/values/time_zone.rb') diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 4f2fc5e44b..ced823f052 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -211,6 +211,11 @@ class TimeZone tzinfo.local_to_utc(time, dst) end + # Available so that TimeZone instances respond like TZInfo::Timezone instances + def period_for_utc(time) + tzinfo.period_for_utc(time) + end + # Available so that TimeZone instances respond like TZInfo::Timezone instances def period_for_local(time, dst=true) tzinfo.period_for_local(time, dst) -- cgit v1.2.3