diff options
author | Claudio B. <claudiob@users.noreply.github.com> | 2015-09-08 21:55:45 -0700 |
---|---|---|
committer | Claudio B. <claudiob@users.noreply.github.com> | 2015-09-08 21:55:45 -0700 |
commit | bf4f739e0793c048cdba02e46c76fe2f46202da4 (patch) | |
tree | 21da0a80b98f4742550fd77e3a99f317a9193320 | |
parent | fecf9d729a81c6c08fef92936e659cdfcf340be5 (diff) | |
parent | 2f86d1c8819e43a82911a712ace673ca239092d4 (diff) | |
download | rails-bf4f739e0793c048cdba02e46c76fe2f46202da4.tar.gz rails-bf4f739e0793c048cdba02e46c76fe2f46202da4.tar.bz2 rails-bf4f739e0793c048cdba02e46c76fe2f46202da4.zip |
Merge pull request #21559 from claudiob/timestamp-doc
Fix docs of AR::Timestamp to match #15726
-rw-r--r-- | activerecord/lib/active_record/timestamp.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/timestamp.rb b/activerecord/lib/active_record/timestamp.rb index 20e4235788..e759475cfb 100644 --- a/activerecord/lib/active_record/timestamp.rb +++ b/activerecord/lib/active_record/timestamp.rb @@ -15,14 +15,21 @@ module ActiveRecord # # == Time Zone aware attributes # - # By default, ActiveRecord::Base keeps all the datetime columns time zone aware by executing following code. + # Active Record keeps all the <tt>datetime</tt> and <tt>time</tt> columns + # time-zone aware. By default, these values are stored in the database as UTC + # and converted back to the current Time.zone when pulled from the database. # - # config.active_record.time_zone_aware_attributes = true + # This feature can be turned off completely by setting: # - # This feature can easily be turned off by assigning value <tt>false</tt> . + # config.active_record.time_zone_aware_attributes = false # - # If your attributes are time zone aware and you desire to skip time zone conversion to the current Time.zone - # when reading certain attributes then you can do following: + # You can also specify that only <tt>datetime</tt> columns should be time-zone + # aware (while <tt>time</tt> should not) by setting: + # + # ActiveRecord::Base.time_zone_aware_types = [:datetime] + # + # Finally, you can indicate specific attributes of a model for which time zone + # conversion should not applied, for instance by setting: # # class Topic < ActiveRecord::Base # self.skip_time_zone_conversion_for_attributes = [:written_on] |