atreyuxtrading / atreyu-backtrader-api

Atreyu's integration of IB Native API with backtrader
BSD 2-Clause "Simplified" License
91 stars 58 forks source link

' time-zone entered is invalid' error #14

Open regmeg opened 9 months ago

regmeg commented 9 months ago

Hi,

I am following this tutorial to simply try to print some live data from TWS

As result I get the following error

Error: {'reqId': 16777217, 'errorCode': 10314, 'errorString': 'End Date/Time: The date, time, or time-zone entered is invalid. The correct format is yyyymmdd hh:mm:ss xx/xxxx where yyyymmdd and xx/xxxx are optional. E.g.: 20031126 15:59:00 US/Eastern Note that there is a space between the date and time, and between the time and time-zone. If no date is specified, current date is assumed. If no time-zone is specified, local time-zone is assumed(deprecated). You can also provide yyyymmddd-hh:mm:ss time is in UTC. Note that there is a dash between the date and time in UTC notation.', 'advancedOrderRejectJson': ''}

Is there a way to overcome it? Look's like requests need a different time zone specification as discussed here

What would be the simplest way to solve this issue?

Thanks

regmeg commented 9 months ago

So the fix is to fork atreyu-backtrader-api and change all 'GMT' into 'UTC' in ibstore.py