开发者

Maximum(:created_at) does not give the timestamp in local time format

Maximum(:created_at) does not give the timestamp in local time format but in UTC.

I am using Rails 2.3.8开发者_JAVA技巧

Is there another way to get the latest created_at in local time?


You can use the getlocal method of the Time class, to obtain the local time from an UTC time.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜