I have made the following table on mysql to save the time that a client visit the page:
CREATE TABLE `visitas` (
`**idv**` int(11) AUTO_INCREMENT,
`**fecha**` timestamp **DEFAULT CURRENT_TIMESTAMP**,
`**ip**` varchar(15)
PRIMARY KEY (`**idv**`))
On php I run the next query:
mysql_query("INSERT INTO `visitas`(`ip`) VALUES ('$ip')");
The problem is that mysql save the time of the United States, and I want the time of Mexico.
I have tryed:
mysql_query("SET time_zone = '-06:00'");
but it doesnt take effect.
Please help me to make that mysql automatically save the time that i want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.