FIX added date formatting

This commit is contained in:
Franco Springveldt 2017-08-09 09:49:58 +12:00
parent 0d6b44aa44
commit 236bf6d8fc

View File

@ -100,7 +100,7 @@ class BlogArchiveWidget extends Widget
$query = SQLSelect::create($fields, "BlogPost{$suffix}") $query = SQLSelect::create($fields, "BlogPost{$suffix}")
->addGroupBy($publishDate) ->addGroupBy($publishDate)
->addOrderBy('PublishDate Desc') ->addOrderBy('PublishDate Desc')
->addWhere(array('PublishDate < ?' => SS_Datetime::now())); ->addWhere(array('PublishDate < ?' => SS_Datetime::now()->Format('Y-m-d')));
$posts = $query->execute(); $posts = $query->execute();
$result = new ArrayList(); $result = new ArrayList();