Why is DateTime.now returning 'invalid date'?
In a haml partial I have:
=@date = DateTime.now
and it's returning' invalid date':
/usr/local/lib/r开发者_运维问答uby/1.9.1/date.rb:809:in civil'
/usr/local/lib/ruby/1.9.1/Date.rb:1810:in
now'
Any ideas why?
Try this:
=@date = Time.now
精彩评论