I am trying to change the timezone of my database. I am on shared server and database support guys can not change it for me only. Time zone is currently +1:00
I want it as +05:30
. I searched and tried following but nothing worked.
date_default_timezone_set('timezone_name');
Added to my index.php
file.
mysql> SET GLOBAL time_zone = 'timezone_name';
It says access restricted.
SET time_zone = timezone_name
Query run now row affected.
My site is hosted on site-ground us server.
+ INTERVAL 4 HOUR
or whatever to your queries.Yeah,it`s annoying.OR maybe trySET SESSION time_zone = 'yourtime';
– Mihai