Reputation:
when i selected row from db i get 16:26:03: database=# select posts.created_at from posts where id = 1;
created_at
----------------------------
2012-04-10 16:26:03.538866
but from code
logger.info Post.find(1).created_at
2012-04-10 12:26:03.538866
Why get time differs from the time to the database?
Upvotes: 2
Views: 46
Reputation:
i found answer.
file:
environment.rb
line:
config.time_zone = 'Eastern Time (US & Canada)'
Upvotes: 2