rails/rails — Issue #4752: Rails inadvertently ignores the configured time zone in one case
Author: krschacht
Created: 2012-01-30 06:28:53+00:00
State: open

When you change the time zone in application.rb to something other than your local time rails magically converts all the times except in one case.

Date.today.to_time

This returns the time in your local system time rather than in the configured time zone. This was the source of a bug in my application that took me awhile to track down, finally I discovered this oddity. The work-around I'm using is:

Date.today + 0.seconds