Hello, let me add 2 Eurocents to your discussion
1. Please see my recent bug report at
JoomlaCode
- it clearly shows that Joomla! code is not consistent in dealing with "created" and "modified" dates of the Articles. Hence the bug in Joomla! core.
To fix it we need to patch Joomla! in the places where it set that "created" and "modified" dates.
2. As I figured out from your discussion, yvComment acts as expected now, so we may safely use this code to determine the rigth value for current date in MySQL format:
Code: Select all
jimport('joomla.utilities.date');
$jnow = new JDate();
$now = $jnow->toMySQL();
The resulted value: $now - may be used to set "created" and "modified" dates,
e.g. in file "components/com_content/models/article.php" you should change
Code: Select all
$article->created = gmdate('Y-m-d H:i:s');
to
Code: Select all
jimport('joomla.utilities.date');
$jnow = new JDate();
$now = $jnow->toMySQL();
$article->created = $now;
Changing template file, as Olaf proposed, is only partial solution, because you will still have inconsistency (in fact, erroneous dates) in the database...