Times returned by API-NG

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • betdynamics
    Junior Member
    • Sep 2010
    • 534

    #1

    Times returned by API-NG

    Are the times returned by the API-NG local times, or UTC times?

    For example, if you call listMarketCatalogue for a particular market, would the returned marketStartTime be a UTC time?

    Basically I am trying to determine if the marketStartTime is always returned with the same value regardless of the locale of the person who is making the call.
  • Zhong
    Junior Member
    • May 2009
    • 14

    #2
    It's UTC time from the server.

    Comment

    • AlgoTrader
      Junior Member
      • Mar 2012
      • 243

      #3
      All times are returned in ISO string format "2014-03-22T16:00:00.000Z". Timezone is Z, which stands for Zero (GMT).

      JSON came from JavaScript, in JavaScript you can use get Date object from ISO string immediatly

      Code:
      var date = new Date('2014-03-22T16:00:00.000Z')
      
      console.log(date)
      Sat Mar 22 2014 20:00:00 GMT+0400 (Moscow time (winter))
      Most of modern languages can also work with ISO date stings natively
      Betfair Bots Made Easy

      Comment

      • gavvythegunner
        Junior Member
        • Nov 2013
        • 2

        #4
        utc or bst?

        when i fetch event data I am getting event times in utc, however the event time returned contains the "BST" letters indicating that
        it is a "bst" time. So my question is , is this a bug? and how do I adjust the time i.e. if i were to parse the time and it contained the characters "UTC" it would be an obvious adjustment but now it is not!

        Comment

        • Guest

          #5
          UTC as said above.

          The great thing about using C# or VB NET is that the language supports time conversion, ie when I get the result from betfair I simply use the .ToLocalTime function shown below


          Code:
          marketCatalogues(i).MarketStartTime.ToLocalTime

          Comment

          Working...
          X