Date and Time compatibility
Time.to_datetime creates a DateTime object with the local timezone
Date.to_datetime creates a DateTime object with the +0000 timezone
As a result, Date.to_time.to_datetime gives a different result than Date.to_datetime.
#1 [ruby-core:55178] Updated by tadf (tadayoshi funaba) about 5 years ago
- Status changed from Open to Rejected
it's the current spec.
i think you are interested in the following case too.
#=> 2001-02-03 00:00:00 +0900
i honestly don't like this feature.
but i think i just provided what users want in this case.