diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-25 11:03:57 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-25 11:08:48 +0100 |
commit | 218415e01624fdd33d577a9bd321516f8e4e4ee9 (patch) | |
tree | 92a8532ca57309cd1442ad31d0ceb53c3b94c99d /lib/configuration.rb | |
parent | 85bd8e00a1af3c7de1514224a6b3ee47f9fc2d6a (diff) |
Fix failing timezone specs. As we are now setting a value for timezone in config.timezone, this switches on ActiveRecord::time_zone_aware_attributes, so values are returned in the time zone specified (although still saved in whatever is specified in ActiveRecord.default_timezone in the db - in our case UTC). Previously with no timezone set, values would have been returned in UTC.
So add some lines to look at the zone the data is saved in before the time_zone_aware_attributes kick in, and some lines to look at the values afterwards. Note that expected raw_saved time values are the same as the previous expected values for saved time (when there was no attribute time zone awareness), but that the time zone of values coming back on the model is set by config.time_zone and then overridden by Time.use_zone.
Diffstat (limited to 'lib/configuration.rb')
0 files changed, 0 insertions, 0 deletions