fix use of undefined method in rails < 4.0.2
create time wrapper class