diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/date_time/conversions.rb | 4 |
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 |