Historical Data 5minute showing New York Time

Hi everyone,

I am facing issue with the data m trying to pull for 5minute historical data. Seems like it’s giving me New York time data in dataframe, pls help
  • sujith
    Can you check what is your system timezone? Is it set to IST?
  • TheRenjithR
    Will it work if I set it to IST because right now it is Dubai time
  • sujith
    Yes, that should fix it.
  • TheRenjithR
    TheRenjithR edited May 2020
    I just tried Sujith, seems the same issue

    def fetchOHLC(ticker,interval,duration):
    instrument = instrumentLookup(instrument_df,ticker)
    print("Processing OHLC Data")
    data = pd.DataFrame(kite.historical_data(4267265,dt.date.today()-dt.timedelta(5), dt.date.today(),interval, continuous=False))
    return data

  • rakeshr
    We send date object in the IST time zone in WebSocket streaming data.
    Are you setting any different timezone for your dataframe(df)?
    You can also debug the same by printing raw historical data APIs date field before converting to dataframe and post-conversion.
  • TheRenjithR
    you may pls close the thread. I had to restart the system to change the timezone applicable. Thank you for your support.
This discussion has been closed.