Regardless of the time of day you decide to fly, the ticket price will remain around the same. Book flights from San Salvador to Havana as you normally would.
San Salvador El Salvador Intl Airport is SAL and Havana Jose Marti Intl Airport is HAV. These codes are created by the International Air Transport Association (IATA) and airlines use them to identify the departing and arrival airports in the flight routes they service.