"Having a good time" is the perfect antonym for the phrase "had a bad time." It denotes the opposite of the negative experience associated with the latter. This phrase indicates that a person has experienced positive emotions, such as joy, happiness, and contentment, during an event or activity. For instance, someone who had a good time at a party could have enjoyed the music, the company of friends, and the food. Similarly, a person could have had a good time at a movie theater, a park, or a restaurant, depending on their taste and preferences. Overall, "having a good time" is an excellent way to counteract the negative connotations of "having a bad time.