PDOException: SQLSTATE[HY000]: General error: 1298 Unknown or incorrect time zone: 'Asia/Kolkata' in /var/www/dresscode2/app/Providers/Database.php:34 Stack trace: #0 [internal function]: PDO->exec('SET time_zone="...') #1 /var/www/dresscode2/app/Providers/Database.php(34): Phalcon\Db\Adapter\Pdo->execute('SET time_zone="...') #2 [internal function]: App\Providers\Database->App\Providers{closure}() #3 [internal function]: Phalcon\Di\Service->resolve(NULL, Object(Phalcon\Di\FactoryDefault)) #4 [internal function]: Phalcon\Di->get('db', NULL) #5 /var/www/dresscode2/app/Providers/Session.php(18): Phalcon\Di->getShared('db') #6 [internal function]: App\Providers\Session->App\Providers{closure}() #7 /var/www/dresscode2/app/Modules/Backend/Module.php(39): Phalcon\Di\Service->resolve() #8 [internal function]: App\Modules\Backend\Module->registerServices(Object(Phalcon\Di\FactoryDefault)) #9 /var/www/dresscode2/app/WebApplication.php(71): Phalcon\Mvc\Application->handle(NULL) #10 /var/www/dresscode2/public/index.php(20): App\WebApplication->handle() #11 {main} here thi isssue is coming
1 Answer
It looks like the time zone data isn't loaded into MariaDB.
This can be done with mariadb-tzinfo-to-sql, or the pre-generated information from mariadb mirrors.
-
for this i have updated the timezone.sql in maria db my sql and set timezone is 'Asia/Kolkata' for the system set the default time zone using this command ="sudo dpkg-reconfigure tzdat" but still not working– cresolAug 12, 2022 at 7:38
-
this issue is coming in phalcon demo project when i update this in mardiadb it showing 404 error– cresolAug 12, 2022 at 7:48