I have code like this:
hh = History.select("STRFTIME(\"%Y-%m-%d %H\", created_at) AS created_at, ..., count(*) AS count_all")
puts hh[0].created_at
If config.active_record.default_timezone
isn't set that code works correctly, otherwise hh[0].created_at = nil
.
Why?
And how I can fix it?