I get "date_default_timezone_set(): Timezone ID '' is invalid" error suddenly on my running yii2 advanced project after clearing all data from database to upload to live server (Coincidentally, I know this has no relation). Same code is working on the live server but local computer(window xampp) show this error. I also tried changing the time zone from php.ini ...everything is fine. Other project also on yii2 advance are running fine. I also tried date_default_timezone_set('UTC'); in my file. I have searched for 2 days ..Everyone suggest to place timezone in php.ini or date_default_timezone_set('Asia/Kathmandu') on filedate. my php.ini portion looks like
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone=Asia/Kathmandu
error looks like: this I have looked at many question here like link,link