I have the problem, that doing a query in rails converts the the wrong time in the generated postgres sql statement. The time in the shell, ruby and postgres is 23:32, but in the generated sql statement it is 22:32
Any Ideas whats wrong? I Use rails 3.2.11, pg gem 0.14.1 (installed with bundle install)
debian system time:
$ date
Sat Feb 9 23:32:10 CET 2013
in ruby:
1.9.2p290 :004 > Time.now
=> 2013-02-09 23:32:15 +0100
in postgres:
=> select current_time;
timetz
--------------------
23:32:24.213487+01
(1 row)
generated rails query:
1.9.2p290 :003 > Item.where "next_crawling_at < ?", Time.now
Item Load (1.1ms) SELECT "items".* FROM "items" WHERE (next_crawling_at < '2013-02-09 22:32:17.935595')