Time was wrongly accept non-numeric objects.

https://bugs.ruby-lang.org/issues/8173