diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index e39a9b6f43..791a2f2712 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Switched to_xml to use the xml schema format for datetimes. This allows the encoding of time zones and should improve operability. [Koz] + * Added a note to the documentation for the Date related Numeric extensions to indicate that they're approximations and shouldn't be used for critical calculations. [Koz] diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 840421789b..4cd171a6d1 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -12,7 +12,7 @@ module Conversions XML_FORMATTING = { "date" => Proc.new { |date| date.to_s(:db) }, - "datetime" => Proc.new { |time| time.to_s(:db) } + "datetime" => Proc.new { |time| time.xmlschema } } def to_xml(options = {})