aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-08-25 03:56:21 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-08-25 03:56:21 +0000
commitee2397036fc8d4a9498617349fb391389d8bb933 (patch)
treec1490e0410b3ea09b2128885bf8905c1acd0b380 /activerecord/lib
parent91dff3004192c2b94c17078f36b7d9fc35c1cf27 (diff)
downloadrails-ee2397036fc8d4a9498617349fb391389d8bb933.tar.gz
rails-ee2397036fc8d4a9498617349fb391389d8bb933.tar.bz2
rails-ee2397036fc8d4a9498617349fb391389d8bb933.zip
SQLServer: work around bug where some unambiguous date formats are not correctly identified if the session language is set to german. Closes #5894.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
index a19da5a545..ff77c382d2 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb
@@ -356,7 +356,8 @@ module ActiveRecord
case value
when TrueClass then '1'
when FalseClass then '0'
- when Time, DateTime then "'#{value.strftime("%Y-%m-%d %H:%M:%S")}'"
+ when Time, DateTime then "'#{value.strftime("%Y%m%d %H:%M:%S")}'"
+ when Date then "'#{value.strftime("%Y%m%d")}'"
else super
end
end