diff options
author | José Valim <jose.valim@gmail.com> | 2011-12-20 18:22:21 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-20 18:22:21 +0100 |
commit | 7ab47751068c6480e7e44fc9265a7e690dd4af3b (patch) | |
tree | 256b236f0d37625f9d74af4d4280a4673fb4f805 /activesupport/lib/active_support/core_ext/date_time/conversions.rb | |
parent | 51095be1b08b1dd2a8a049f009bac6220fa7a68b (diff) | |
download | rails-7ab47751068c6480e7e44fc9265a7e690dd4af3b.tar.gz rails-7ab47751068c6480e7e44fc9265a7e690dd4af3b.tar.bz2 rails-7ab47751068c6480e7e44fc9265a7e690dd4af3b.zip |
Initial pass at removing dead 1.8.x code from Active Support.
There are a bunch of other implicit branches that adds
1.8.x specific code that still needs to be removed. Pull
requests for those cases are welcome.
Diffstat (limited to 'activesupport/lib/active_support/core_ext/date_time/conversions.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/date_time/conversions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 ca899c714c..851012e3bf 100644 --- a/activesupport/lib/active_support/core_ext/date_time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date_time/conversions.rb @@ -66,7 +66,7 @@ class DateTime # Attempts to convert self to a Ruby Time object; returns self if out of range of Ruby Time class. # If self has an offset other than 0, self will just be returned unaltered, since there's no clean way to map it to a Time. def to_time - self.offset == 0 ? ::Time.utc_time(year, month, day, hour, min, sec, sec_fraction * (RUBY_VERSION < '1.9' ? 86400000000 : 1000000)) : self + self.offset == 0 ? ::Time.utc_time(year, month, day, hour, min, sec, sec_fraction * 1000000) : self end # To be able to keep Times, Dates and DateTimes interchangeable on conversions. |