rubyapibetfair

Betfair API output time zone off sometimes


I am laying bets through the Betfair API and noticed something very strange. For some events the time is off on both market and event results.

My account date and time are set to Europe/London. Not that it matters, the API outputs whatever zone it wants anyway, apparently at random (sometimes GMT other times London or whatever other timezone, but the ISO timestamp does not include +0100 or whatever GMT offset), all this despite the fact that my account is set to EU/London.

For example let's take this event Superettan / Jonkopings Sodra v Varnamo

The API output is:

{"event"=>{"id"=>"28836884", 
"name"=>"Jonkopings Sodra v Varnamo", "countryCode"=>"SE", 
"timezone"=>"GMT", "openDate"=>"2018-08-13T18:00:00.000Z"
}, "marketCount"=>2}

Their website however says the event starts at 17:00 GMT / 18:00 London (now GMT+1).

There are hundreds examples like this. Cannot get anything out of Betfair support, they take days/weeks to reply and when they do they just send some canned message.

Has someone seen this issue before? Or perhaps I am missing something?

Later edit: I had to dump all their market data to reach this conclusion: it appears that when their API says the timezone is GMT the event is actually on London, so GMT+1 right now, and for every other timezone (Eu/London, Perth, US...) the time is actually on GMT. Not sure what's up with that. Still investigating.


Solution

  • All times returned by Betfair are in UTC - that's just the way the API works. They also supply time zones which may or may not be correct. Use the time zones as an indication of the local time of the event. However, the time zones are very "hit and miss", so don't rely on them to be correct. In fact, over time you will notice lots of "data errors" for non-pricing info on Betfair markets. This is just the way it goes. so don't expect them to fix the errors