aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2015-05-03 11:07:02 -0700
committerZachary Scott <e@zzak.io>2015-05-03 11:07:02 -0700
commit8ce44b287f0dab4918a26aeadd0a96a671b1161c (patch)
tree12a5a26d8285f3c30b2f51cfca6ae24261c4196c /activerecord/lib
parent71669370ae789f547311821ab880b0f19682b405 (diff)
parente61c32cb38dc3853a66ecb87550ba97be634c442 (diff)
downloadrails-8ce44b287f0dab4918a26aeadd0a96a671b1161c.tar.gz
rails-8ce44b287f0dab4918a26aeadd0a96a671b1161c.tar.bz2
rails-8ce44b287f0dab4918a26aeadd0a96a671b1161c.zip
Merge pull request #19988 from kamipo/move_comment_about_microseconds
Move comment about microseconds [ci skip]
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/quoting.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
index 91c7298983..2c7409b2dc 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
@@ -123,6 +123,8 @@ module ActiveRecord
'f'
end
+ # Quote date/time values for use in SQL input. Includes microseconds
+ # if the value is a Time responding to usec.
def quoted_date(value)
if value.acts_like?(:time)
zone_conversion_method = ActiveRecord::Base.default_timezone == :utc ? :getutc : :getlocal
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
index b7755c4593..f175730551 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
@@ -40,8 +40,7 @@ module ActiveRecord
PGconn.quote_ident(name.to_s)
end
- # Quote date/time values for use in SQL input. Includes microseconds
- # if the value is a Time responding to usec.
+ # Quote date/time values for use in SQL input.
def quoted_date(value) #:nodoc:
if value.year <= 0
bce_year = format("%04d", -value.year + 1)