investpy
investpy copied to clipboard
economic_calendar - wrong UTC time shift
Hi,
I have this code:
t=dt.datetime.utcnow() t1=t+ dt.timedelta(days=1) dfInv = inv.economic_calendar(from_date=t.strftime('%d/%m/%Y'), to_date=t1.strftime('%d/%m/%Y'), countries=["United States","euro zone","japan","united kingdom","canada","australia"], importances=["high","medium"],time_zone="GMT") dfInv
and return :
`
4 | 448025 | 08/04/2022 | 13:30 | canada | CAD | high | Employment Change (Mar) | None | 80.0K | 336.6K |
---|
` where time is 13:30, but on the investing.com is:
`
12:30 | CAD | Employment Change (Mar) | 80.0K | 336.6K |
---|
`
Mayby is problem with DST?
I had a similar problem, that i posted here. Now I have found this thread, this seems more appropriate....its not a DST problem because the time changes each time i pull the data (maybe 10 seconds apart)
https://github.com/alvarobartt/investpy/discussions/452#discussioncomment-3700967
Does anyone understand what is happening or has a work around or a solution?