@jasonbukowski opened this Issue on December 13th 2013

There is a bug in Piwik 2, that appeared at before 2.0-b11, that results in the report data not being displayed at certain times. The data is tracked correctly. Somehow Piwik reports and API return no data between certain hours.

Visitors in Real Time report reports are NOT affected by this.

This maybe points to a problem in archiving or some code related to archiving. Let's find out and try to release a new version 2.0.2.
Keywords: visits timezone wrong date

@jasonbukowski commented on December 14th 2013


@jasonbukowski commented on December 14th 2013


@mattab commented on December 13th 2013 Owner

When you say "report is showing that the visit occurred at 22:00 on December 12th" what do you mean exactly, where is this displayed?

Maybe you could post a screenshot that shows data displayed with the wrong time, it would help me, cheers

@mattab commented on December 13th 2013 Owner
My sites are running in the New York timezone, which is -5 hours from UTC.
At 19:00 New York time, on a Thursday for example, it is 00:00 Friday UTC.
Visits between 19:00 and 23:59 NY time on a Thursday are being tracked/reported as visits between 19:00 and 23:59 Friday.
Simply put, the times of the visits are always correct when looking at the servertime reports, but if it is the next day in UTC time at the time of visit, the visit is being reported as happening the next day, which is still in the future for NY time.
On December 12th all my visits after 19:00 we're being reported as visits on December 13th, even though it was still the 12th.
The time is always being reported correctly, but if there is a difference in the website timezone's current day and UTC's current day, the visit is incorrectly being attributed to the UTC current day.

In forum: http://forum.piwik.org/read.php?2,108213

Thanks for the report

@jasonbukowski commented on December 14th 2013

Although I'm only using the API, I was able to get the UI to display some pages that highlight this problem.

These screenshots were taken on December 13th, 2013 at 21:30 NY Time, the same timezone the websites are configured for.

I modified the URLs so that they would display data for December 14th (as highlighted in the URL bar)


Above, you will see that visits are being reported for December 14th, 19:00 - 21:00.


Above, you will see in the visit chart that there have been 36 visits in total recorded for December 14th, 2013.

It is still December 13th, 2013 in my timezone and in the website's timezone.

@mattab commented on December 16th 2013 Owner
@mattab commented on December 18th 2013 Owner

Maybe this is the same report as: http://forum.piwik.org/read.php?2,108410

NOTE: many users experience this bug!

@mattab commented on December 19th 2013 Owner

report from email:

Version 2.0 has a serious bug in it in regards to time zones.  I ended up installing a fresh copy of it yesterday.Today it recorded activity okay up until a certain point.  Then all the widgets stopped adding visits info.  Upon further investigation the visits after a certain time of day are being counted as activity on the next day, even though we aren't on the next day yet.  I am on New York time. 
@mattab commented on December 19th 2013 Owner

Initial ticket report below:

I have a website configured to be on the New York timezone. The server time report (retrieved from getVisitInformationPerServerTime API method) correctly returns visits at the appropriate time for my timezone in most cases, with a very large exception. In cases where it is near the end of the day in NY, but it is the following day UTC, the report shows the visit for the correct hour in the NY timezone, but displays it for that hour on the following day.

For example, at 22:00 December 11th NY Time, which would be 03:00 December 12th UTC, the server time report is showing that the visit occurred at 22:00 on December 12th. It seems the time is being adjusted appropriately, but the date itself is not.

This is equally affecting standard visit report retrieved from the API as well, with visits late in the day being recorded as visits for the following day. In the case of the site configuration mentioned above, visits I am receiving after 19:00 NY time (00:00 UTC) are being reported as visits from one day in the future, from the NY perspective.

Visitors in Real Time report in NOT affected by this.

@mattab commented on December 19th 2013 Owner

from forum:

I just updated to 2.0.1 and it's still the same. No data for Previous 30 days (not including today), but there's data for Last 30 days (including today).

@diosmosis commented on December 20th 2013 Member

In 2f3bb08029763a118552fe8f6ac80253efb24eaf: Fixes #4380, make sure site's timezone is applied when selecting log data to aggregate. Includes integration test + doc fixes to Date function.

@mattab commented on December 20th 2013 Owner

To all users having this issue:

Can you please apply following change. Open file core/DataAccess/LogAggregator.php
replace at line 149

$this->dateStart = $params->getPeriod()->getDateStart();
        $this->dateEnd = $params->getPeriod()->getDateEnd();


$this->dateStart = $params->getDateStart();
        $this->dateEnd = $params->getDateEnd();

Then either delete the piwikarchive*_2013_12 , or wait up to 24 hours to see if the bug is fixed.

Does it fix it?

@mattab commented on December 20th 2013 Owner

Bug fix was confirmed in the forums by three users. Great find @capedfuzz!

This Issue was closed on December 20th 2013
Powered by GitHub Issue Mirror