diff --git a/code/widgets/BlogArchiveWidget.php b/code/widgets/BlogArchiveWidget.php index 2755664..e6b7b8f 100644 --- a/code/widgets/BlogArchiveWidget.php +++ b/code/widgets/BlogArchiveWidget.php @@ -100,7 +100,7 @@ class BlogArchiveWidget extends Widget $query = SQLSelect::create($fields, "BlogPost{$suffix}") ->addGroupBy($publishDate) ->addOrderBy('PublishDate Desc') - ->addWhere(array('PublishDate < ?' => SS_Datetime::now())); + ->addWhere(array('PublishDate < ?' => SS_Datetime::now()->Format('Y-m-d'))); $posts = $query->execute(); $result = new ArrayList();