php - Change PHPmyadmin timezone on shared server -
I am trying to save a query in my database using CURRENT_TIMESTAMP. The problem is that the time zone is not correct and when I talked to the hostgator support from the people, they gave me this answer:
After researching this issue, I came to know that You can only change it on the site, to convert it to phpmyadmin, you will need root access, which you do not keep on shared servers.
The server has a 2 hour difference from my home country (Chile) Does anyone know what I can do? I am using this code to update the database:
& lt ;? Php $ lat = $ _GET ['lat']; $ Lane = $ _GET ['lane']; // Create a MySQL connection $ db_database = "xxx"; $ Db_hostname = "xxx"; $ Db_username = "xxx"; $ Db_password = "xxx"; $ Enlace = mysql_connect ($ db_hostname, $ db_username, $ db_password); If (! $ Enlace) {die ('no powders canisters:'. Mysql_error ()); } Echo "Satisfactory shrinkage" Br> '; // mysql_close ($ enlace); Mysql_select_db ('XXXxx') or die (mysql_error ()); $ Q = "` posicion` ('Hora', `` `` `` '' ''); Include in values (zero, '$ latitude', '$ lane') "; // run query $ result = mysql_query ($ q) or die (mysql_error ()); Echo "Tamos ready"; ? & Gt; The configuration of and the 'Hora' column is as follows:
Does anyone find a way to solve it?
¡Thank you!
In case of shared hosting, you need to contact people or contact for live chat and They can change the default time zone for you.
You can use the date_default_timezone_set () which defines a default timezone.
Please take a look
Comments
Post a Comment