I am going crazy with the following error. I have a User class and two of its attributes (birthday & created_at => datetime) returns always nil besides it has a value on
Had the same problem, and it was specifically
config.active_record.default_timezone
This caused activerecord to return all UTC-stored timestamps as null. Not sure why, but removing it brought back all data. I was able to leave default config.time_zone in place.
config.active_record.default_timezone
requires a symbol, either :local or :utc.
config.time_zone
requires a regular time zone as you have done.
config.active_record.default_timezone
determines whether to use Time.local (if set to :local) or Time.utc (if set to :utc) when pulling dates and times from the database. The default is :utc.
http://guides.rubyonrails.org/configuring.html#configuring-active-record
I found the problem.
Some days ago I changed the config/application.rb file adding the following configuration to solve some issues with timezones:
config.time_zone and config.active_record.default_timezone
I've just removed them and all is working fine again.