hstore-attributes
hstore-attributes copied to clipboard
support ActiveSupport::TimeWithZone and store datetime in UTC
If time zone is present, datetime attributes will be stored with timz zone e.g."2013-10-15 13:26:23 +0800". However, when they are read from database, it's converted to Time object in UTC time zone ignoring the time zone +0800.
Datetime attributes should be stored in UTC format using #utc
method when they are written to database. When read from database, they should be converted to correct time zone using in_time_zone(Time.zone)