aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/date_time/conversions.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-10-01 02:16:15 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-10-01 02:16:15 +0000
commit22dc11c6b17c22247b4e3d1b2b0329d9ca638da6 (patch)
tree676f851bd9233d7d0be26b6345c4c614597a0581 /activesupport/lib/active_support/core_ext/date_time/conversions.rb
parentec4989618ec08d20024a05500bea088514fbdfd4 (diff)
downloadrails-22dc11c6b17c22247b4e3d1b2b0329d9ca638da6.tar.gz
rails-22dc11c6b17c22247b4e3d1b2b0329d9ca638da6.tar.bz2
rails-22dc11c6b17c22247b4e3d1b2b0329d9ca638da6.zip
Fixed Date#xmlschema for dates outside the range of what can be created with Time (closes #9744) [gbuesing]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7707 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/date_time/conversions.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/date_time/conversions.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/date_time/conversions.rb b/activesupport/lib/active_support/core_ext/date_time/conversions.rb
index 4739e3fb6d..776f1806f9 100644
--- a/activesupport/lib/active_support/core_ext/date_time/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/date_time/conversions.rb
@@ -45,6 +45,10 @@ module ActiveSupport #:nodoc:
def to_datetime
self
end
+
+ def xmlschema
+ strftime("%Y-%m-%dT%H:%M:%S#{offset == 0 ? 'Z' : '%Z'}")
+ end
end
end
end