Making the string returned by Time.now look nicer

Hi,

You shouldn't. The to_s method is meant to show all data of the time
object (including the time zone, milliseconds etc.). If you want to get
a certain time format, use the strftime method:

http://www.ruby-doc.org/core-1.9.3/Time.html#method-i-strftime

now = Time.now
puts now.strftime('%Y-%m-%d %H:%M')

···

--
Posted via http://www.ruby-forum.com/.