I think I found a bug but I am not 100% sure if it is one or I am doing something wrong. I am setting up the timezone like this:
... config.i18n.default_locale = :en config.time_zone = 'Melbourne' config.active_record.default_timezone = 'Melbourne' ...
When I am updating a model with timestamp columns (
updated_at) it doesn't update them. The problem is caused by this line
config.active_record.default_timezone = 'Melbourne' (when I remove it, it works fine). The query seems to be fine but when you reload the model the timestamps are nil. I think the problem appears in all the datetime columns and it doesn't matter which database you are using (I managed to reproduce it in postgres and in sqlite).
Is this something that I would expect because I forgot to configure something or is it a bug?
config.active_record.default_timezone accepts only two values:
What you can do is set:
config.time_zone = 'Melbourne'
config.active_record.default_timezone = :local
will do the trick.