mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] Add note about tsrange and timezone awareness to docs
This commit is contained in:
parent
8383f79d92
commit
21f0136fc7
1 changed files with 5 additions and 1 deletions
|
@ -16,7 +16,7 @@ module ActiveRecord
|
|||
# == Time Zone aware attributes
|
||||
#
|
||||
# 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
|
||||
# timezone aware. By default, these values are stored in the database as UTC
|
||||
# and converted back to the current <tt>Time.zone</tt> when pulled from the database.
|
||||
#
|
||||
# This feature can be turned off completely by setting:
|
||||
|
@ -28,6 +28,10 @@ module ActiveRecord
|
|||
#
|
||||
# ActiveRecord::Base.time_zone_aware_types = [:datetime]
|
||||
#
|
||||
# You can also add database specific timezone aware types. For example, for PostgreSQL:
|
||||
#
|
||||
# ActiveRecord::Base.time_zone_aware_types += [:tsrange, :tstzrange]
|
||||
#
|
||||
# Finally, you can indicate specific attributes of a model for which time zone
|
||||
# conversion should not applied, for instance by setting:
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue