Kuestenschmiede / ReservationBundle

Contao module for creating reservation forms. For example for tables, rooms or other objects.
GNU General Public License v3.0
2 stars 3 forks source link

setTimezone() parameter #1 has to be a timezone object, Tag 2.5.4 #34

Open Aybee opened 1 year ago

Aybee commented 1 year ago

Tag 2.5.4 Contao 4.9.42 PHP 8.1.24

Sorry, I haven't managed to send a push request for Tag 2.5.4. So here manually.

This error was thrown: setTimezone() parameter #1 has to be a timezone object

My push request:

... line 11
namespace con4gis\ReservationBundle\Classes;
  +  use DateTimeZone;

... line 31
  -            $dateTimeObject->setTimezone($GLOBALS['TL_CONFIG']['timeZone']);
  +            $dateTimeObject->setTimezone(new DateTimeZone($GLOBALS['TL_CONFIG']['timeZone']));
... line 47
  -            $dateTimeObject->setTimezone($GLOBALS['TL_CONFIG']['timeZone']);
  +            $dateTimeObject->setTimezone(new DateTimeZone($GLOBALS['TL_CONFIG']['timeZone']));