website header Blogger Guwl

Open Question: PHP MySQL setting Time zone is not working?

Im trying to run an SQL query to change my timezone, right now it's UTC so 4 hours ahead of EST. Ive tried: SET SESSION time_zone ='-4:00'; and SET time_zone ='-4:00'; but that doesnt work. It says Your SQL query has been executed successfully. but when I update a query using NOW(), it still shows the UTC timezone. I tried: ALTER DATABASE SET TIME_ZONE = 'US/Eastern'; and it's not working, i get this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET TIME_ZONE = 'US/Eastern'' at line 1 I've tried: ALTER DATABASE SET TIME_ZONE = '-4:00' and It shows: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET TIME_ZONE = '-4:00'' at line 1 And lastly: #1227 - Access denied; you need the SUPER privilege for this operation when I try: SET GLOBAL time_zone = 'US/Eastern'; Any help here? Nothing seems to be working..
Home - Privacy Policy