aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorclaudiob <claudiob@gmail.com>2015-09-08 21:43:38 -0700
committerclaudiob <claudiob@gmail.com>2015-09-08 21:43:38 -0700
commit2f86d1c8819e43a82911a712ace673ca239092d4 (patch)
tree21da0a80b98f4742550fd77e3a99f317a9193320 /activerecord/lib
parentfecf9d729a81c6c08fef92936e659cdfcf340be5 (diff)
downloadrails-2f86d1c8819e43a82911a712ace673ca239092d4.tar.gz
rails-2f86d1c8819e43a82911a712ace673ca239092d4.tar.bz2
rails-2f86d1c8819e43a82911a712ace673ca239092d4.zip
Fix docs of AR::Timestamp to match #15726
[ci skip] @sgrif can you review when you have time? Thanks!
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/timestamp.rb17
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]