Update DB time calculation to be up-to-date with how ActiveRecord 4.0.x do it