Project

General

Profile

Actions

Bug #1564

closed

Joomla 1.5: Last online offseted by the server offset

Added by beat over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
03 March 2010
Due date:
% Done:

100%

Estimated time:
1:00 h

Description

In Joomla 1.5 at registration, then first login (but seems any other login too), the last-online is offseted.
Might be related to some reports of bug #82 .
http://www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/id,81908/catid,70/

Findings of Kyle:
I've located the update of the actual last visit time. It's loaded at:
\libraries\joomla\database\table\user.php
Line: 292
function setLastVisit( $timeStamp=null, $id=null )
I then traced this function to:
\libraries\joomla\user\user.php
Line: 274
function setLastVisit($timestamp=null)
The trigger is found at:
\plugins\user\joomla.php
Line: 75
function onLoginUser($user, $options = array())
With $instance->setLastVisit(); commented out then the insert is not made. So the variables are being passed through that from somewhere somehow. I can't seam to trace it anywhere beyond this point. I believe it's the onlogin trigger in CB, but I can't find it.
In \libraries\joomla\database\table\user.php I changed $date->toMySQL() to date( 'Y-m-d H:i:s' ) and the date/time was then correct. $date is derived from $date =& JFactory::getDate($timeStamp); so it all leads back to $timestamp, which I can't seam to find out what in CB is passing through to timestamp or where from.
Reviewing the database entires I can conclude exactly 6 hrs is being added on to the time for some absurd reason, but can't locate where these 6 hours is coming from.

This is a joomla 1.5 bug (even without CB):
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=14451

Confirmed joomla 1.5 bug:
http://www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/id,87966/catid,77/limit,6/limitstart,6/
Open ../libraries/joomla/database/table/user.php
locate the line that reads
. ' SET lastvisitDate = '.$this->_db->Quote($date->toMySQL())
and replace it with
. ' SET lastvisitDate = '.$this->_db->Quote(date( 'Y-m-d H:i:s' ))

As joomla wont' fix it, we will have to work-around...

Actions

Also available in: Atom PDF