From 94fa9fb74541b60ed04f2694558a6a98a9ce1cab Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Sun, 10 Feb 2008 17:02:22 +0000 Subject: TimeZone#new renamed #local, so that new TimeWithZone instances can be created via Time.zone.local() git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/values/time_zone.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index fed64579e4..4f2fc5e44b 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -177,9 +177,9 @@ class TimeZone # Method for creating new ActiveSupport::TimeWithZone instance in time zone of self. Example: # - # Time.zone = "Hawaii" # => "Hawaii" - # Time.zone.new(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 - def new(*args) + # Time.zone = "Hawaii" # => "Hawaii" + # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 + def local(*args) Time.utc_time(*args).change_time_zone(self) end -- cgit v1.2.3