开发者

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

开发者 https://www.devze.com 2023-01-16 11:50 出处:网络
Maximum(:created_at) does not give the timestamp in local time format but in UTC. I am using Rails 2.3.8开发者_JAVA技巧

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

精彩评论

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