Difference of the "Start Publishing" option between articles

The support for Joomla 2.5 ended on December 31, 2014. Possible bugs in Joomla 2.5 will not be patched anymore. This forum has been closed. Please update your website to Joomla 3.x

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Locked
o-sup
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jan 31, 2013 4:33 pm

Difference of the "Start Publishing" option between articles

Post by o-sup » Wed Feb 13, 2013 9:09 am

When I published a article with 'Start Publishing' option,there is no problem.
But in case of publishing a banner,I got unanticipated result.

* Please forgive me about my english representation is not good.



For example,

It's 02:00, February 01, 2013 in Tokyo

I publish a article.And set 'Start Publishing' option '2013-02-01 02:05'.

The article can be seen at 02:05.

But when I publish a banner with same conditions,the banner is appear
immediately.

This problem is caused by differences in the source code below.

---conditions------------------------------------
<banner's setting>
Start Publishing: 2013-02-01 02:05
<article's setting>
Start Publishing: 2013-02-01 02:05

<MySQL (#_banners)>
`Publish_up` : 2013-01-21 17:05
<MySQL (#_articles)>
`Publish_up` : 2013-01-21 17:05

<Joomla!'s time zone : Tokyo(GMT+9H)
------------------------------------------------

----- source code --------

<banners>
\components\com_banners\models\banners.php line 83-84

Code: Select all

$query->where('('.$query->currentTimestamp().' >= a.publish_up OR
a.publish_up = '.$nullDate.')');
$query->where('('.$query->currentTimestamp().' <= a.publish_down OR
a.publish_down = '.$nullDate.'
<articles>
\components\com_content\models\articles.php line 397-400

Code: Select all

$nowDate	= $db->Quote(JFactory::getDate()->toSql());

$query->where('(a.publish_up = '.$nullDate.' OR a.publish_up <=
'.$nowDate.')');
$query->where('(a.publish_down = '.$nullDate.' OR a.publish_down >=
'.$nowDate.')');
------------------------------

----- values compared in this code ------
<banners>
currentTimestamp = '2013-02-01 02:00'
a.publish_up = '2013-01-21 17:05'

=> currentTimestamp > a.publish_up



<articles>
$nowDate = '2013-01-21 17:00'
a.publish_up = '2013-01-21 17:05'

=> $nowDate < a.publish_up
-----------------------------------------

Is this specifications ?

Locked

Return to “Joomla! 2.5 Bug Reporting”