From: spiketeika@... Date: 2016-04-22T08:24:54+00:00 Subject: [ruby-core:75108] [Ruby trunk Bug#12271] `Time#to_time` removes timezone information Issue #12271 has been updated by Kaneko Yuichiro. I feel this is a like feature change. For example, it seems a rubyist felt this change be incompatibility. https://github.com/rails/rails/issues/24617 Do you think this change is bug fix? ---------------------------------------- Bug #12271: `Time#to_time` removes timezone information https://bugs.ruby-lang.org/issues/12271#change-58239 * Author: Kaneko Yuichiro * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) * Backport: 2.1: WONTFIX, 2.2: REQUIRED, 2.3: REQUIRED ---------------------------------------- ```ruby irb(main):001:0> RUBY_VERSION => "2.3.0" irb(main):002:0> require 'date' => true irb(main):003:0> ENV['TZ'] = 'US/Eastern' => "US/Eastern" irb(main):004:0> time = Time.new(2005, 2, 21, 10, 11, 12, '+09:00') => 2005-02-21 10:11:12 +0900 irb(main):005:0> time.to_time => 2005-02-20 20:11:12 -0500 ``` Same as https://bugs.ruby-lang.org/issues/12189, `Time#to_time` does not use self timezone. I think it is better to make it to match with `DateTime#to_time` behavior. ---Files-------------------------------- time.diff (1.35 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: