Fixed phpbb import: Server Error DateTimeZone

FrankPereiro

Active member
Hi there, Mike and Chris

I'm really sorry for my misunderstanding. I had the original file with it's name changed in the importer directory, that caused all the errors.

Once I got rid of that file, the importer worked flawlessly, of course, with the code Mike recommended.

You can close this ticket since everything is OK now.

I think I've made the right decision moving moving my forum to xenforo. Thanks for all your help, really appreciate it.
 
In library/XenForo/Importer/PhpBb31x.php, please replace:
Code:
        $time = new DateTime('now', new DateTimeZone($timeZone));
        $offset = $time->getTimezone()->getOffset($time) / 60 / 60;
        $timeZone = $this->_importModel->resolveTimeZoneOffset($offset, $useDst);
        return $timeZone;
with:
Code:
try
{
   $time = new DateTime('now', new DateTimeZone($timeZone));
   $offset = $time->getTimezone()->getOffset($time) / 60 / 60;
   return $this->_importModel->resolveTimeZoneOffset($offset, $useDst);
}
catch (Exception $e)
{
   return $this->_importModel->resolveTimeZoneOffset($timeZone, $useDst);
}
Does that resolve the issue?
I had the same issue and this resolved it for me. Upgrading from phpbb3 3.1.6. Thanks!
 
Top