I have a model called Order which has a DATETIME (Mysql) column called expiration
I do the following:
order = Order.last
wanted_time = Time.use_zone('Pacific Time (US & Canada)') { Time.now.end_of_day.to_datetime }
And wanted_time gives me: Thu, 20 Nov 2014 23:59:59 -0800
However, when I do:
order.expiration = wanted_time
When I try to fetch order.expiration, I get:
Fri, 21 Nov 2014 07:59:59 UTC +00:00
Why is that? If I specifically have defined the zone I wanted to store it with?