RoR Postgresql timezone group by not working on Heroku
问题 I would like my reports to display in CST while my database is in UTC. For this to work I need to be able to group by a time column and have the db do timezone conversions. This works on my dev postgresql box: offset = -5 result = ActiveRecord::Base.connection.execute("select date(srl.created_at AT TIME ZONE '#{offset.to_s}') AS date, count(*) from server_request_logs srl where srl.created_at between '#{@from.to_s(:db)}' and '#{@to.to_s(:db)}' group by date(srl.created_at AT TIME ZONE '#