Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2387 closed Bug (fixed)

Visitor Log to show one day too early in some cases

Reported by: matt Owned by:
Priority: normal Milestone: 1.5 - Piwik 1.5
Component: Core Keywords:
Cc: Sensitive: no

Description

See example in forum

It is a small regression following recent fixes.

Change History (7)

comment:1 Changed 3 years ago by SteveG (sgiehl)

Guess the problem is here:

http://dev.piwik.org/trac/browser/trunk/plugins/Live/API.php#L308

If period is day it will always show the day before!

comment:2 Changed 3 years ago by peterb (peterbo)

PLease also refer to http://forum.piwik.org/read.php?5,76195 - I already had a talk with Matt about this statement. It seems like deleting the "->subDay(1)" call would rise another issue.

comment:3 Changed 3 years ago by matt (mattab)

I have commmitted a patch for this issue, see the few lines following: http://dev.piwik.org/trac/browser/trunk/plugins/Live/API.php#L372

I haven't tested much, in particular with timezones like GMT-8 and GMT+8 but these few lines should help

comment:4 Changed 3 years ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [4710]) Fixes #2387 - test is most welcome!

comment:5 Changed 3 years ago by antlee

Thanks for the fix, but I'd like to know if it is ok just overwrite the stock file(API.php) with the trunk.

In stock 1.4, the "->subday(1)" makes errors on day/week/month/year selection on specific dates in Visitor Log page, please check my test result on (note: user-defined range does not have errors)
http://forum.piwik.org/read.php?2,76196,page=1#msg-77084

comment:6 Changed 3 years ago by matt (mattab)

It's not going to work to reuse the API.php file like this, but you can just try to change the IF block that starts at line: http://dev.piwik.org/trac/browser/trunk/plugins/Live/API.php?rev=4710#L375 then it should work with 1.4

Your tests are very appreciated.. I am not 100% sure that all issues are fixed!

comment:7 Changed 3 years ago by mattm

so far so good it seems to have fixed my issues will report back if I find anything.

Note: See TracTickets for help on using tickets.