When i am accessing my magento website i am getting errors
DateTimeZone::__construct(): Unknown or bad timezone ()
on Block and CMS pages and all my product list pages on frontend shows 404 page not found error. Please check and help me out to fix this issue ASAP.
You can check this problem at here.
I solve this error by restoring my backup site.
But if you know why this error is coming then this question is still open
Best Answer
I don't know exactly HOW it happened, but in my scenario the
core_config_data
table was corrupted. It had added a new row somehow withpath
set togeneral
andvalue
set toNULL
:This caused
Magento\Framework\App\Config\ScopeConfigInterface::getValue()
onpublic/vendor/magento/framework/Stdlib/DateTime/Timezone.php::scopeDate()
to returnNULL
instead ofEurope/Amsterdam
. Needless to say, when the\DateTimeZone()
object was created it immediately threw this exception.So if anyone else encounters this error, your configuration might be an obvious place to start looking.