Open ghost opened 10 years ago
Actually IB is sending the data in localtime and not in GMT. The code has a bug as it assumes GMT fixed my copy locally but did not know how to checkin and so cut and pasted my patch here, Hopfully someone can update the repository,
/// <summary>Overridden in subclass.</summary>
private bool ProcessMsg(IncomingMessage msgId)
.......................
if(longDate < 30000000) // timeStamp = new DateTime(Int32.Parse(date.Substring(0, 4)), Int32.Parse(date.Substring(4, 2)), Int32.Parse(date.Substring(6, 2)), 0, 0, 0, DateTimeKind.Utc).ToLocalTime(); timeStamp = new DateTime(Int32.Parse(date.Substring(0, 4)), Int32.Parse(date.Substring(4, 2)), Int32.Parse(date.Substring(6, 2)), 0, 0, 0, DateTimeKind.Local).ToLocalTime(); else timeStamp = new DateTime(1970,1,1,0,0,0,DateTimeKind.Utc).AddSeconds(longDate).ToLocalTime();
When i pull Historical data after 8 am EST, i can get till EOD yesterday. If i pull it before 8 AM EST, i get data ie 2 days old. Can anyone duplicate it.