If apply through Sherpa, you may apply any time before you travel. We'll take care of ensuring that your application is submitted at the right time. If applying directly on the government website, you must apply no earlier than three months before you intend to travel.
In both cases, it's strongly recommended that you apply at least 48 hours before departure.
Please be sure to enter your travel dates correctly in order to ensure that your eVisa is valid for the appropriate time period.