aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/type/date_time_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Print the proper ::Float::INFINITY value when used as a default valueRaimo Tuisku2016-05-231-1/+1
| | | | Addresses https://github.com/rails/rails/issues/22396
* skipped assertion on datetime seconds precision as it is only valid for ↵Ronak Jangir2015-09-241-0/+1
| | | | newer mysql versions
* Fixed taking precision into count when assigning a value to timestamp attributeBogdan Gusiev2015-09-231-0/+13
Timestamp column can have less precision than ruby timestamp In result in how big a fraction of a second can be stored in the database. m = Model.create! m.created_at.usec == m.reload.created_at.usec # => false # due to different seconds precision in Time.now and database column If the precision is low enough, (mysql default is 0, so it is always low enough by default) the value changes when model is reloaded from the database. This patch fixes that issue ensuring that any timestamp assigned as an attribute is converted to column precision under the attribute.