Date.today显示正确的日期,但是当我Date.today在Model.create语句中使用它时,它会在数据库中插入上一个日期,而在数据库Date.today.to_datetime中插入正确的日期。
我的问题是为什么Date.today在Model.create方法中在数据库中插入以前的日期?
Date.today显示正确的日期,但是当我Date.today在Model.create语句中使用它时,它会在数据库中插入上一个日期,而在数据库Date.today.to_datetime中插入正确的日期。
我的问题是为什么Date.today在Model.create方法中在数据库中插入以前的日期?