fork 0k-charms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
923 B

  1. diff --git a/app/classes/Framadate/Repositories/PollRepository.php b/app/classes/Framadate/Repositories/PollRepository.php
  2. index 4a1e6ea..7cedca1 100644
  3. --- a/app/classes/Framadate/Repositories/PollRepository.php
  4. +++ b/app/classes/Framadate/Repositories/PollRepository.php
  5. @@ -202,7 +202,17 @@ class PollRepository extends AbstractRepository {
  6. $prepared->execute();
  7. - return $prepared->fetchAll();
  8. + $polls = $prepared->fetchAll();
  9. +
  10. + foreach ($polls as $poll) {
  11. + /**
  12. + * Hack to make date a proper DateTime
  13. + */
  14. + $poll->creation_date = Type::getType(Type::DATETIME)->convertToPhpValue($poll->creation_date, $this->connect->getDatabasePlatform());
  15. + $poll->end_date = Type::getType(Type::DATETIME)->convertToPhpValue($poll->end_date, $this->connect->getDatabasePlatform());
  16. + }
  17. + return $polls;
  18. +
  19. }
  20. /**