Skip to content

Commit

Permalink
Fixed warning: method redefined; discarding old to_time
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Jan 7, 2012
1 parent 84e4801 commit 0250e42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core_ext/date_time/conversions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class DateTime
# 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(year, month, day, hour, min, sec, sec_fraction * (RUBY_VERSION < '1.9' ? 86400000000 : 1000000)) : self
end
end unless method_defined?(:to_time)

end

0 comments on commit 0250e42

Please sign in to comment.