Dave-Vallance / bt-ccxt-store

Fork of Ed Bartosh's CCXT Store Work
MIT License
422 stars 185 forks source link

How to add timezone in feeds.CCXT? #49

Open zgpnuaa opened 3 years ago

zgpnuaa commented 3 years ago

The default is UTC time. How can I change the timezone to another timezone? I use the following code, but it doesn't work.

data_min = bt.feeds.CCXT(exchange='binance', symbol="BTC/USDT", name="btc_usd_min", fromdate=hist_start_date,
                             timeframe=bt.TimeFrame.Minutes, tz=pytz.timezone('Asia/Shanghai'))