I have a timestamp that is in UTC
\"2010-10-25 23:48:46 UTC\"
I need to convert it into ISO 8601
\"2010-10-29 06:09Z\"
The documentation is
After much experimenting, I find the Time library's parser to be better than DateTime, although the reasons escape me at the moment. With that caveat, I always use Time rather than DateTime for this kind of stuff, and the ruby documentation is also difficult to grok as to why this is so,
require 'time'
puts Time.parse("2010-10-25 23:48:46 UTC").iso8601
"2010-10-25T23:48:46Z"