-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent Economic Calendar Times #331
Comments
Hi @agftrading, thanks for reporting this issue! 👍 I've labeled it not just as a bug but also as an Investing.com issue, as I think that the bug comes from the site and not from the Python package. Anyway, I'll reproduce the issue and try to solve it as it may also be that Investing.com updated the values from the timezones, which means that either the API method or the allowed parameters (so on the default value may be wrong, when But as you mention that either using a defined Thanks for reporting this! Consider it done or at least checked in the next couple of days 🔥 |
That is great. Thanks! |
Hi, May I know when this issue will be resolved? |
Hi @mpresence I didn't have time until now to work on my projects, but now I do, so I'll try to work on most of the relevant issues/bugs during this weekend so that later I can also focus on the feature requests 👍🏻 |
Thanks @alvarobartt you have done a great job with this...keep it up 😊 |
Maybe it's not the correct way of fixing this problem, I'm still a newbie in programming, but in the file "utils/constant.py" I modified the "TIMEZONES" set and only left one element for each time zone list, and now the function gives me the same hours, it doesn't switch anymore. I think the problem comes from there, some numbers in the lists dont correspond to the correct GMT zones. |
Mmm thanks for spotting that @rodrigoperales! TBH that may be the issue, but as far as I could check in the past in Investing.com they are using those selectors... Anyway I'll check this further later today so as to provide you a more detailed answer tomorrow! So on, in case that's the issue feel free to open a PR once I give you a more detailed answer 👍🏻 |
I did a inspection to see the values of the timezones in investing's website and these are the correct values now: TIMEZONES = { I checked it a little bit to see if it worked and it did. I wish I could help more and made this more automatic but i lack the knowledge. Thanks by the way for this amazing work. |
Thanks for the support and the kind words @rodrigoperales! 🤗 No worries, I'll try that and I will also be looking forward to the time change so as to see whether those values change or not, so as to provide a more consistent solution, since using static data (not super easy to update) is obviously not the desired solution. FYI I'm planning to deprecate as much of the static data as I can for |
That sounds great, it must be difficult to do that. Thanks |
Thanks @rodrigoperales this worked for me |
@rodrigoperales Hi Rodrigo, how did you get the values for the variable TIMEZONE in investings website? |
There seems to be some "randomisation" going on of the times when retrieving data from the economic calendar.
Example (run on 08/04/2021):
investpy.economic_calendar(time_zone=None,time_filter='time_only',importances=['high'],countries=['UK'])
On the first run returns:
If I run it again it returns:
If I run it multiple more times, it seems to switch randomly between the two sets of times.
In the above example, the first run returns incorrect (vs. what I would expect) times and the second run returns correct times. It does not make any sense to me why running exactly the same code might return different times in each case. The problem persists even if I specify the time_zone parameter explicitly.
Taking the first row of data as an example. The times are returned seemingly randomly when the code is run over and over again as outlined below.
Run with time_zone= 'GMT'. Returns, inconsistently, either 08:30 or 09:30.
Run with time_zone = 'GMT -1:00'. Returns, inconsistently, either 07:30 or 08:30.
Run with time_zone = 'GMT +1:00'. Rturns, incosistently, either 09:30 or 10:30.
The text was updated successfully, but these errors were encountered: