Yes, just checked a few. It did take me some time to decide how to adjust for British Summer Time in VB.NET, but the following sorted that out:
kickoff = inrec.openDate.tolocaltime ' should put games at correct BST/GMT time (converts GMTakaUTC to local)
However, the start times of some games don't agree with Flashscores. For instance, the kickoff for
Vejgaard v Sydvest in Denmark kicks off at noon according to FlashScores, but my program has converted it to 1pm. Kjellerup v Dalum, also in Denmark, appears to be wrong.
This Russian youth team game shows as 9:00am but Flashscores says 8:00am: FK Krasnodar (Y) v Spartak Moscow (Y)
Yes, just checked a few. It did take me some time to decide how to adjust for British Summer Time in VB.NET, but the following sorted that out:kickoff = inrec.openDate.tolocaltime ' should put games at correct BST/GMT time (converts GMTakaUTC to loca
Betfair have started to use the "Timezone" property along with the "OpenDate" property to specify kick-off times in the "EventResult" object.
Until recently I have only ever seen "Timezone" specified as "Europe/London" but now some events wil have a "GMT" timezone specified.
The other factor involved in this is how your Json DeSerializer works on DateTime properties that have no timezone specification because the "OpenDate" property is only returned in the json in "yyyy-MM-dd HH:mm:ss" format with no timezone specified. I use Newtonsoft.Json and a DateTime in the format "yyyy-MM-dd" is deserialized to a DateTime with a Kind property of DateTimeKind.Utc. This may be different for other deserializers, for instance they may default to DateTimeKind.Local, so you need to check.
"Europe/London" is a Utc DateTime (not adjusted for BST) and so when I have an "OpenDate" with a DateTimeKind.Utc there is no conversion to be done and so something like this will work.
DateTime localtime = OpenDate.ToLocalTime();
When Betfair have a timezone of "GMT" they are specifying a time that is adjusted for BST but the "OpenDate" property has a DateTimeKind.Utc and so OpenDate.ToLocalTime(); will be one hour out while we are in BST. I am based in the UK and only use my software for my own use and so I can convert the "GMT" times as follows:
DateTime localTime = new DateTime(OpenDate.Ticks, DateTimeKind.Local);
This is not a complete solution as Betfair may use other Timezones in the future, for example they may use "Europe/Berlin" for German kick-off times. The correct way for .NET applications would be to convert the olson timezone such as "Europe/Berlin" to its .NET equivalent which is "W. Europe Standard Time" and then perform the converstion using the TimeZoneInfo class.
Hope that helps
Betfair have started to use the "Timezone" property along with the "OpenDate" property to specify kick-off times in the "EventResult" object.Until recently I have only ever seen "Timezone" specified as "Europe/London" but now some events wil have a "
Betfair have started to use the "Timezone" property along with the "OpenDate" property to specify kick-off times in the "EventResult" object.
Until recently I have only ever seen "Timezone" specified as "Europe/London" but now some events wil have a "GMT" timezone specified.
The other factor involved in this is how your Json DeSerializer works on DateTime properties that have no timezone specification because the "OpenDate" property is only returned in the json in "yyyy-MM-dd HH:mm:ss" format with no timezone specified. I use Newtonsoft.Json and a DateTime in the format "yyyy-MM-dd" is deserialized to a DateTime with a Kind property of DateTimeKind.Utc. This may be different for other deserializers, for instance they may default to DateTimeKind.Local, so you need to check.
"Europe/London" is a Utc DateTime (not adjusted for BST) and so when I have an "OpenDate" with a DateTimeKind.Utc there is no conversion to be done and so something like this will work.
DateTime localtime = OpenDate.ToLocalTime();
When Betfair have a timezone of "GMT" they are specifying a time that is adjusted for BST but the "OpenDate" property has a DateTimeKind.Utc and so OpenDate.ToLocalTime(); will be one hour out while we are in BST. I am based in the UK and only use my software for my own use and so I can convert the "GMT" times as follows:
DateTime localTime = new DateTime(OpenDate.Ticks, DateTimeKind.Local);
This is not a complete solution as Betfair may use other Timezones in the future, for example they may use "Europe/Berlin" for German kick-off times. The correct way for .NET applications would be to convert the olson timezone such as "Europe/Berlin" to its .NET equivalent which is "W. Europe Standard Time" and then perform the converstion using the TimeZoneInfo class.
Hope that helps
Betfair have started to use the "Timezone" property along with the "OpenDate" property to specify kick-off times in the "EventResult" object.Until recently I have only ever seen "Timezone" specified as "Europe/London" but now some events wil have a "