Maximum(:created_at)
does not give the timestamp in local time format but in UTC.
I am using Rails 2.3.8
Is there another way to get the latest created_at in local time?
Maximum(:created_at)
does not give the timestamp in local time format but in UTC.
I am using Rails 2.3.8
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.