Updating time function to account for early AM