How do I print out a ruby time using the date-time format:
2009-02-17T05:00-07:00
Like Time.now.to_datetime_s
How do I print out a ruby time using the date-time format:
2009-02-17T05:00-07:00
Like Time.now.to_datetime_s
Have you checked out Time#strftime? You can read more about it at: http://ruby-doc.org/core/classes/Time.html#M000298.
Time#iso8601 (or Time#xmlschema) produces output in this format. (You may have to require 'time'
beforehand).