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
'today' and 'yesterday' return different results than using todays date and yesterdays date #10099
Comments
Did you execute this script on "April 27th"? What's your timezone for that site? Btw: The displayed dates should be UTC I think this might be related to #8761 and it may be related to https://github.com/piwik/piwik/blob/2.16.1/plugins/Live/Model.php#L485-L490 Can you maybe comment the line in https://github.com/piwik/piwik/blob/2.16.1/plugins/Live/Model.php#L489 and see if it works afterwards? |
This was executed on April 27, at approximately 11:00pm - Pacific Time. If the displayed dates are UTC, then the input should also be UTC - otherwise it is really confusing trying to pull info out. A better option would be to be able to set local time and do everything that way - cause that is how humans think) I am not running piwik on our own server, so I cannot comment those lines out - thnaks. |
The input basically means today in the website's timezone. The property you are likely printing here is |
I think this should be re-opened as a bug. Regardless of whether it is printing UTC time or not, 'today' is reporting some of the same things as 'yesterday'. and 04/27 is reporting some of the same things as 04/26. The report for those time periods should be mutually exclusive. Something cannot be both yesterday and today, or 4/26 and 4/27. |
that's very true. Sorry for closing it, I didn't really realize that point. Re the API and the column name we likely cannot really change it as it would break many APIs etc. |
Thanks for the report @gleasj Note: this error should be restricted to the API |
When pulling a report using the API (and python), the results that come back are inconsistent.
There seems to be something wrong with the date conversion.
Here is the query I am using, and the results that come back:
The text was updated successfully, but these errors were encountered: