Open gleasj opened 8 years ago
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 https://github.com/piwik/piwik/issues/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 serverTimePretty
which basically means UTC but doesn't say it which is not ideal indeed.
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.
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 method=Live.getLastVisitsDetails
and maybe other Live.*
APIs but as for the other plugins APIs it should work as expected.
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: