Skip to content

Commit

Permalink
Fix date.timezone on Travis
Browse files Browse the repository at this point in the history
Also `DateTimeInterface` is only available since PHP 7.2
  • Loading branch information
j0k3r committed Oct 7, 2019
1 parent 8c3b12b commit d1dbce1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ before_install:
install:
- composer up --no-interaction --prefer-dist -o

before_script:
- echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

script:
- mkdir -p build/logs
- php vendor/bin/simple-phpunit -v $PHPUNIT_FLAGS
Expand Down
2 changes: 1 addition & 1 deletion src/Extractor/ContentExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ public function validateDate($date)
return null;
}

return (new \DateTime($date))->format(\DateTimeInterface::W3C);
return (new \DateTime($date))->format(\DateTime::W3C);
}

protected function addAuthor($authorDirty)
Expand Down

0 comments on commit d1dbce1

Please sign in to comment.