Timezone bug? Visits being reported on the correct hour#4380

Labels

Milestone

Assignee

3 participants

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

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.

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.

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.