Invalid Race times

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OliasOfSunhillow
    Junior Member
    • Feb 2013
    • 57

    #1

    Invalid Race times

    Do we still have to program round the fact that the API returns invalid race times by 1 hour during uk summer time or is there a way of nudging Betfair API ?
  • jim tollan
    Junior Member
    • Apr 2014
    • 5

    #2
    There is a good reason for keeping all times in UTC, otherwise other timezones have to deal with the double whammy of translating to utc, then to their own timezone. THe best bet is to get your client code to deal with this in an independent fashion (much as you probably do now). I use .net and use the timezone library for that, there are also javascript solutions that work equally as well.

    I guess the thrust of your question tho is to ask whether it's possible to pass an additional parameter to the api (your country code??) and receive the appropriate TimeZone.Offset(). That would certainly make for less client code littering, but I'm not sure if ths simple request would put stress on the backend systems, where local solutions would work without all those potential issues.

    Comment

    • OliasOfSunhillow
      Junior Member
      • Feb 2013
      • 57

      #3
      Thanks for the reply. I have and will program round the problem but at the same time I always feel that service suppliers should fix all problems that are fixable at their end not ours. The code to test an extra parameter would be negligible at their end. I wonder how many people have discovered this need at the client end by virtue of the fact that suddenly during their first year all bets were not being struck and after some head scratching realised that all the times were wrong. There will be many more that will stumble upon this. If your code is likely to be run only from one country then an optional parameter should be available.

      Comment

      • betdynamics
        Junior Member
        • Sep 2010
        • 534

        #4
        It is better NOT to do it on the server. Just because a person has an account based in the UK, doesn't mean to say that they are using it from the UK.

        The de facto standard for "timezone-independent" times is UTC and that is what they are using.

        It is easy to convert times from UTC to Local Time (all major languages have a supporting call) so then your program works wherever it is.

        For example, I can set up virtual machines for Sweden, Hong Kong and Australia and my program works on all of them work WITHOUT MODIFICATION because times are held on the server in UTC and converted to the local time as set by the operating system on the client.

        Comment

        Working...
        X