Daylight savings this could be.
I'll explain how the date is stored and shown.
First thing, when the user posts a comment we do the following:
$createdate = JFactory::getDate();
$createdate = $createdate->toMySQL();
so we save the date without any timestamp. Just as the server give it to us.
The this functions takes care about the output everywhere:
/*
* Function to display the Date in the right format with Offset
*/
function getLocalDate($strdate,$format='%Y-%m-%d %H:%M:%S') {
jimport('joomla.utilities.date');
$user =& JFactory::getUser();
// if we have an anonymous user, then use global config, instead of the user params
if($user->get('id')) {
$tz = $user->getParam('timezone');
} else {
$conf =& JFactory::getConfig();
$tz = $conf->getValue('config.offset');
}
$jdate = new JDate($strdate);
$jdate->setOffset($tz);
$formatDate = $jdate->toFormat($format);
return $formatDate;
}
If the user is not logged in, then we output the default date.
If the user is logged in, then we get the user timezone.
If the user didn't specify a timezone, then we will have 0 for timezone, but this is also fine.
All dates for the user will look the same. It is impossible that one commnet is with +1h timezone and another one with -10h timezone, because all comments will be outputed through the same function.