diff --git a/protected/humhub/libs/DbDateValidator.php b/protected/humhub/libs/DbDateValidator.php index 3957cf3cf0..20f5145721 100644 --- a/protected/humhub/libs/DbDateValidator.php +++ b/protected/humhub/libs/DbDateValidator.php @@ -78,7 +78,7 @@ class DbDateValidator extends DateValidator $this->addError($model, $attribute, $this->tooBig, ['max' => $this->maxString]); } else { // If there is no error, and attribute is not yet in DB Format - convert to DB - $date = new \DateTime(null, new \DateTimeZone('UTC')); + $date = new \DateTime('now', new \DateTimeZone('UTC')); $date->setTimestamp($timestamp); if ($timeValue) {