I have a DateTime object in Rails that is called as follows:
ruby-1.8.7-p302 > Time.now => Wed Nov 10 16:46:51 -0800 2010
How to convert a DateObject to return a datetime XML type string as follows:
ruby-1.8.7-p302 > Time.now.convert_to_xml => 2010-11-10T16:46:51-08:00
xml datetime ruby-on-rails
Chanpory
source share