omnilight / yii2-scheduling

Scheduling extension for Yii2 framework
MIT License
317 stars 84 forks source link

Don't allow string in _timezone property #61

Open kstkn opened 4 years ago

kstkn commented 4 years ago

Having string in _timezone property didn't have any effect:

php > $date = new \DateTime();
php > var_dump($date->getTimezone()->getName());
string(3) "UTC"
php > $date->setTimezone('Europe/Berlin');

Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in php shell code on line 1
php > var_dump($date->getTimezone()->getName());
string(3) "UTC"