mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
FIX Datetime format for MySQL and Postgres, add widgets to Travis builds
This commit is contained in:
parent
dae2ba0e5f
commit
427abee8b0
@ -23,7 +23,7 @@ before_script:
|
|||||||
|
|
||||||
# Install composer dependencies
|
# Install composer dependencies
|
||||||
- composer install --prefer-dist
|
- composer install --prefer-dist
|
||||||
- composer require --prefer-dist --no-update silverstripe/installer:4.0.x-dev
|
- composer require --prefer-dist --no-update silverstripe/installer:4.0.x-dev silverstripe/widgets:2.x-dev
|
||||||
- if [[ $DB == PGSQL ]]; then composer require --prefer-dist --no-update silverstripe/postgresql:2.0.x-dev; fi
|
- if [[ $DB == PGSQL ]]; then composer require --prefer-dist --no-update silverstripe/postgresql:2.0.x-dev; fi
|
||||||
- composer update
|
- composer update
|
||||||
|
|
||||||
|
@ -117,7 +117,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(['"PublishDate" < ?' => DBDatetime::now()->getISOFormat()]);
|
->addWhere(['"PublishDate" < ?' => DBDatetime::now()->Format(DBDatetime::ISO_DATETIME)]);
|
||||||
|
|
||||||
$posts = $query->execute();
|
$posts = $query->execute();
|
||||||
$result = ArrayList::create();
|
$result = ArrayList::create();
|
||||||
|
Loading…
Reference in New Issue
Block a user