开发者

Why is DateTime.now returning 'invalid date'?

开发者 https://www.devze.com 2022-12-19 05:43 出处:网络
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\'

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:innow'

Any ideas why?


Try this:

=@date = Time.now
0

精彩评论

暂无评论...
验证码 换一张
取 消