aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/json_serialization_test.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-08-04 00:23:58 +0100
committerXavier Noria <fxn@hashref.com>2011-08-13 16:22:29 -0700
commit66e114cd0c0fada80fb3487262a1f578ac910437 (patch)
treefd2dbc100097defee07bd670a4c652dd4c2ea44f /activerecord/test/cases/json_serialization_test.rb
parentf2ea1ddc278d5466f3d3b7c8feb73aa9c78d2628 (diff)
downloadrails-66e114cd0c0fada80fb3487262a1f578ac910437.tar.gz
rails-66e114cd0c0fada80fb3487262a1f578ac910437.tar.bz2
rails-66e114cd0c0fada80fb3487262a1f578ac910437.zip
Quote these dates to prevent intermittent test failure. Suppose local time is 00:50 GMT+1. Without the quoting, the YAML parser would parse this as 00:50 UTC, into the local time of 01:50 GMT+1. Then, it would get written into the database in local time as 01:50. When it came back out the UTC date from the database and the UTC date of two weeks ago would be compared. The former would be 23:50, and the latter would be 00:50, so the two dates would differ, causing the assertion to fail. Quoting it prevents the YAML parser from getting involved.
Diffstat (limited to 'activerecord/test/cases/json_serialization_test.rb')
0 files changed, 0 insertions, 0 deletions