aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/date_time
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-07-03 01:39:54 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-07-03 02:13:44 -0300
commit201f373e7a183f33264ae31e7ca66768dddd3ebe (patch)
tree8e37b9e01841bcb9c017b5b40bdcd834866d7b40 /activesupport/lib/active_support/core_ext/date_time
parent8cc746331c32a6951e5c73c8a21fd32f00680471 (diff)
downloadrails-201f373e7a183f33264ae31e7ca66768dddd3ebe.tar.gz
rails-201f373e7a183f33264ae31e7ca66768dddd3ebe.tar.bz2
rails-201f373e7a183f33264ae31e7ca66768dddd3ebe.zip
Refactor move some date, time and date_time methods to */zones and fixed some requires
Diffstat (limited to 'activesupport/lib/active_support/core_ext/date_time')
-rw-r--r--activesupport/lib/active_support/core_ext/date_time/calculations.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/date_time/conversions.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/date_time/zones.rb2
3 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/date_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_time/calculations.rb
index 26979aa906..1dc3933e12 100644
--- a/activesupport/lib/active_support/core_ext/date_time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/date_time/calculations.rb
@@ -1,5 +1,6 @@
require 'rational' unless RUBY_VERSION >= '1.9.2'
require 'active_support/core_ext/object/acts_like'
+require 'active_support/core_ext/time/zones'
class DateTime
class << self
diff --git a/activesupport/lib/active_support/core_ext/date_time/conversions.rb b/activesupport/lib/active_support/core_ext/date_time/conversions.rb
index c3f0acce25..47b8aa59fb 100644
--- a/activesupport/lib/active_support/core_ext/date_time/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/date_time/conversions.rb
@@ -1,6 +1,7 @@
require 'active_support/inflector'
require 'active_support/core_ext/time/conversions'
require 'active_support/core_ext/date_time/calculations'
+require 'active_support/values/time_zone'
class DateTime
# Ruby 1.9 has DateTime#to_time which internally relies on Time. We define our own #to_time which allows
diff --git a/activesupport/lib/active_support/core_ext/date_time/zones.rb b/activesupport/lib/active_support/core_ext/date_time/zones.rb
index 6002d4ad2a..a7411d54ae 100644
--- a/activesupport/lib/active_support/core_ext/date_time/zones.rb
+++ b/activesupport/lib/active_support/core_ext/date_time/zones.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/time/zones'
+
class DateTime
# Returns the simultaneous time in <tt>Time.zone</tt>.
#