Rails 4.2 doesn't update datetime fields -


i think found bug not 100% sure if 1 or doing wrong. setting timezone this:

inside application.rb

... config.i18n.default_locale = :en config.time_zone = 'melbourne' config.active_record.default_timezone = 'melbourne' ... 

when updating model timestamp columns (created_at, updated_at) doesn't update them. problem caused line config.active_record.default_timezone = 'melbourne' (when remove it, works fine). query seems fine when reload model timestamps nil. think problem appears in datetime columns , doesn't matter database using (i managed reproduce in postgres , in sqlite).

is expect because forgot configure or bug?

config.active_record.default_timezone accepts 2 values:

  • :local
  • :utc

what can set:

config.time_zone = 'melbourne' 

and

config.active_record.default_timezone = :local 

will trick.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -