Skip to content

Commit

Permalink
FIX added date formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Franco Springveldt committed Aug 8, 2017
1 parent 0d6b44a commit 236bf6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/widgets/BlogArchiveWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function getArchive()
$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();
Expand Down

0 comments on commit 236bf6d

Please sign in to comment.