Fixed time not saving in db