fix time problems for ActiveSupport versions greater than 4.1.6