Dates
Overview
When providing dates to the Affiliates Link API, it's important to be aware of scenarios that produce valid searches, and avoid creating scenarios that would result in invalid searches.
It's also important to understand how dates are validated, and how we handle searches across different time zones.
Date Validation
The Affiliates Link API validates against the format of dates provided, but it doesn't validate the values.
It's important to be aware of this, as providing dates that create invalid searches may result in unexpected results when landing on Skyscanner, such as dates being changed, or redirection to an alternative page type to ensure we provide the best results to the traveller.
Examples of some invalid scenarios are described below, but we recommend to check that links generated result in the expected result.
Time Zones
To avoid dealing with the complexity of time zones, we always consider dates as being local to the given location. This means that the travellers time zone makes no difference to the returned flight results.
Consider the following example:
A traveller is in London, UK, and they search for a flight from New York to Paris on 1st February. The results will be for flights that leave between 00:00 - 23:59 New York time (GMT-4), not between 00:00 - 23:59 London time (GMT).
Historical searches
We don't support searches for any dates that are in the past, so this should be avoided completely.
Same day searches
We accept same day searches for flights, hotels and car hire, but we suggest being particularly cautious when doing this.
Be aware of how we handle time zones and the fact that a given location may now be observing the next day.
Consider the following example:
A traveller is in London, UK, where the time is currently 10pm (UTC) on 1st January. They're searching for last-minute flights for a friend who lives in Sydney, Australia, so they search for a same-day flight from Sydney → London.
In Sydney, the time is currently 8am (UTC+10) on the 2nd January, so to perform a same-day search, the search should be for 2nd January instead of 1st January.