From: Bernard Duchesne Date: 2010-08-31T09:43:45+09:00 Subject: [ruby-core:31964] [Ruby 1.9-Bug#3737] DateTime#to_time doesn't preserve zone Issue #3737 has been updated by Bernard Duchesne. Both Time.parse and DateTime.to_time have the same problem. They convert into the local timezone. The original timezone info is lost. In your example it went from +8:00 to +9:00. There is no way to retrieve the original +8:00 timezone after conversion. Keeping the original timezone can be important. They represent a context for the time. For instance, when times are entered on a client application (not a server), they include the local timezone as set on the computer. It is then easy to see which times corresponds to local business hours (anything between 9am and 5pm) irrespective of the timezone. If however all times are converted into a different timezone, it becomes hard to see which times were entered before 5pm. It is probably too late to change the behaviour of a published API like DateTime.to_time but maybe a new function could be added that retains the timezone. At the minimum, this loss of information (timezone) should be documented in both Time.parse and DateTime.to_time. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3737 ---------------------------------------- http://redmine.ruby-lang.org