This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
self.default_timezone = 'Moscow' # работает на запись | |
# ... | |
end | |
1.8.7 :002 > User.first.act_ts | |
=> Sat, 20 Mar 2010 07:06:25 UTC +00:00 | |
# нельзя поменять с change | |
================================ | |
class User < ActiveRecord::Base | |
self.default_timezone = 'Moscow' # работает на запись | |
self.time_zone_aware_attributes = false | |
# ... | |
end | |
1.8.7 :002 > User.first.act_ts | |
Sat, 20 Mar 2010 07:06:25 +0000 | |
# можно поменять с change | |
============================== | |
# И на чтение, и на запись работает если установить | |
# application.rb | |
config.time_zone = 'Moscow' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment