investpy icon indicating copy to clipboard operation
investpy copied to clipboard

economic_calendar - wrong UTC time shift

Open 5xcor opened this issue 2 years ago • 2 comments

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  

`

5xcor avatar Apr 08 '22 07:04 5xcor

Mayby is problem with DST?

5xcor avatar Apr 08 '22 08:04 5xcor

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?

stevenm100 avatar Sep 26 '22 20:09 stevenm100