alvarobartt / investpy

Financial Data Extraction from Investing.com with Python
https://investpy.readthedocs.io/
MIT License
1.59k stars 374 forks source link

economic_calendar - wrong UTC time shift #552

Open 5xcor opened 2 years ago

5xcor commented 2 years ago

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 commented 2 years ago

Mayby is problem with DST?

stevenm100 commented 1 year ago

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?