{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/20876","labels_url":"https://api.github.com/repos/rails/rails/issues/20876/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/20876/comments","events_url":"https://api.github.com/repos/rails/rails/issues/20876/events","html_url":"https://github.com/rails/rails/issues/20876","id":94938947,"number":20876,"title":"Rails is not converting timezones (config.time_zone not working)","user":{"login":"andreynering","id":7011819,"avatar_url":"https://avatars.githubusercontent.com/u/7011819?v=3","gravatar_id":"","url":"https://api.github.com/users/andreynering","html_url":"https://github.com/andreynering","followers_url":"https://api.github.com/users/andreynering/followers","following_url":"https://api.github.com/users/andreynering/following{/other_user}","gists_url":"https://api.github.com/users/andreynering/gists{/gist_id}","starred_url":"https://api.github.com/users/andreynering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreynering/subscriptions","organizations_url":"https://api.github.com/users/andreynering/orgs","repos_url":"https://api.github.com/users/andreynering/repos","events_url":"https://api.github.com/users/andreynering/events{/privacy}","received_events_url":"https://api.github.com/users/andreynering/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-14T12:50:07Z","updated_at":"2015-07-14T15:23:59Z","closed_at":null,"body":"A found this bug on many apps I made, from Rails 4.1.* to 4.2.* (including 4.2.3). I use PostgreSQL.\r\n\r\nI live in Brazil, so I always add this to `application.rb`:\r\n\r\n```ruby\r\nclass Application < Rails::Application\r\n  config.time_zone = 'Brasilia'\r\nend\r\n```\r\n\r\nAt first, it does what it is supposed to do: it converts the time input (from user) from UTC-03:00 to UTC before saving in the database. And in forms and views, it converts from UTC to UTC-03:00.\r\n\r\nBut after some days/few weeks, it simply stops working. Rails does the default behavior instead: assumes UTC for everything and stops converting timestamps from and to UTC-03:00.\r\n\r\nIt's weird, but I couldn't reproduce it in an isolated app. Maybe it is some configuration or gem changing the behavior?"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/121281066","html_url":"https://github.com/rails/rails/issues/20876#issuecomment-121281066","issue_url":"https://api.github.com/repos/rails/rails/issues/20876","id":121281066,"user":{"login":"krlsdu","id":1642008,"avatar_url":"https://avatars.githubusercontent.com/u/1642008?v=3","gravatar_id":"","url":"https://api.github.com/users/krlsdu","html_url":"https://github.com/krlsdu","followers_url":"https://api.github.com/users/krlsdu/followers","following_url":"https://api.github.com/users/krlsdu/following{/other_user}","gists_url":"https://api.github.com/users/krlsdu/gists{/gist_id}","starred_url":"https://api.github.com/users/krlsdu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlsdu/subscriptions","organizations_url":"https://api.github.com/users/krlsdu/orgs","repos_url":"https://api.github.com/users/krlsdu/repos","events_url":"https://api.github.com/users/krlsdu/events{/privacy}","received_events_url":"https://api.github.com/users/krlsdu/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T15:23:59Z","updated_at":"2015-07-14T15:23:59Z","body":"http://guides.rubyonrails.org/configuring.html\r\nLook for timezone, maybe help you."}}