From: usa@... Date: 2016-04-22T09:20:45+00:00 Subject: [ruby-dev:49590] [Ruby trunk Bug#12189] DateTime#to_time removes timezone information Issue #12189 has been updated by Usaku NAKAMURA. Backport changed from 2.1: WONTFIX, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: WONTFIX, 2.2: DONE, 2.3: REQUIRED ruby_2_2 r54694 merged revision(s) 54169. ---------------------------------------- Bug #12189: DateTime#to_time removes timezone information https://bugs.ruby-lang.org/issues/12189#change-58246 * Author: Naotoshi Seo * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin13] * Backport: 2.1: WONTFIX, 2.2: DONE, 2.3: REQUIRED ---------------------------------------- ``` irb(main):004:0> DateTime.strptime('2015-11-12 CET', '%Y-%m-%d %Z') => # irb(main):005:0> DateTime.strptime('2015-11-12 CET', '%Y-%m-%d %Z').to_time => 2015-11-12 08:00:00 +0900 ``` I think it is better to preserve timezone information as `2015-11-12 00:00:00 +0100` -- https://bugs.ruby-lang.org/