public static function checkTimezoneDefault(string $timezoneAllowed, bool $errOnMisMatch = false) : bool
    {
        $time_default = new \DateTime();
        $tz_default = $time_default->getTimezone()->getName();
        if (
            ($timezoneAllowed == 'UTC' || $timezoneAllowed == 'Z')
            && ($tz_default == 'UTC' || $tz_default == 'Z')
        ) {
            return true;
        }
        if ($tz_default != $timezoneAllowed) {
            if ($errOnMisMatch) {
                throw new \LogicException(
                    'Default timezone[' . $tz_default. '] doesn\'t match allowed timezone[' . $timezoneAllowed
                    . '], date.timezone '
                    . (!ini_get('date.timezone') ? 'not set in php.ini.' :
                        'of php.ini is \'' . ini_get('date.timezone') . '\'.'
                    )
                );
            }
            return false;
        }
        return true;
    }