I assume that it suffers from the same problem as DateTime.to_time. This was presented as a bug in Ruby, but rejected. More details here:
http://redmine.ruby-lang.org/issues/show/3737
UPDATE:
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/time/conversions.rb
, API doc . , , to_time. , , ext:
def to_time
self
end unless method_defined?(:to_time)
: https://github.com/rails/rails/blob/4817bf94d135c44ddfae1a30acb15de989e3c86c/activesupport/lib/active_support/core_ext/time/conversions.rb
, , :
ruby-1.9.2-p0 > class Time
ruby-1.9.2-p0 ?> def to_time
ruby-1.9.2-p0 ?> self
ruby-1.9.2-p0 ?> end
ruby-1.9.2-p0 ?>end
=> nil
ruby-1.9.2-p0 > Time.zone = Time.zone_default = "UTC"
=> "UTC"
ruby-1.9.2-p0 > t = "2008-04-01".to_time
=> 2008-04-01 00:00:00 UTC
ruby-1.9.2-p0 > p t.zone, t.to_time.zone
"UTC"
"UTC"
=> ["UTC", "UTC"]
,