You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This extension allows a fake generated timestamp to be assigned to a visit. In order to do so, an overridden method has been created in /core/Tracker/Generator/Visit.php : 33
In /core/Tracker/Visit.php : 226, 254, 290, 356, 427, 572, 773 and 804, the method getCurrentTimestamp() is called.
The method getCurrentTimestamp() of class /core/Tracker/Visit.php is supposed to be an accessor method and not a computational one. Each call of the overridden method getCurrentTimestamp() of class /core/Tracker/Generator/Visit.php computes a new timestamp instead of reusing the first generated one. Because of those unnecessary increments, the time goes too much ahead.
Proposal: Remove the time increment from getCurrentTimestamp() and add a generateTimestamp() method. I have attached a patch to solve this issue. I have decided to access this method from /core/Tracker/Generator/Tracker.php after the creation of the visit. It could be done in the constructor of /core/Tracker/Generator/Visit.php.
At 23:55 PM EDT on May 20th, I ran misc/generateVisits.php. Looking in piwik_log_visit, the visits were generated for May 21st and May 22nd.
(daysToCompute is 1)
The text was updated successfully, but these errors were encountered: