开发者

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

Any ideas why?


Try this:

=@date = Time.now
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜