Closed deepj closed 2 years ago
I think there's tagged specs for the former but not the latter.
I suppose we can close this issue.
I cannot reproduce the issue on the master branch:
require 'date'
# => true
datetime = DateTime.strptime('2018-12-07 11:00:29 -06:00', '%Y-%m-%d %H:%M:%S %Z')
# => #<DateTime: 2018-12-07T11:00:29-06:00 ((2458460j,61229s,0n),-21600s,2299161j)>
datetime.to_time
# => 2018-12-07 11:00:29 -0600
time = Time.new(2018, 12, 7, 11, 00, 29, '-06:00')
# => 2018-12-07 11:00:29 -0600
time.to_time
# => 2018-12-07 11:00:29 -0600
In old Ruby times this was an issue with the standard Date library. But it was fixed in Ruby 2.4
MRI (2.5.3)
TruffleRuby (1.0.0-rc10)
The results of TruffleRuby are wrong here.