how to change database timezone on vps
Posted
by
michael
on Server Fault
See other posts from Server Fault
or by michael
Published on 2013-10-21T01:38:13Z
Indexed on
2013/10/21
3:56 UTC
Read the original article
Hit count: 121
I am running my domain on a vps and I have virtualmin and webmin access.
In my php files, I need to record the current time by using mysql NOW() when a row is inserted.
I changed the timezone from the php configuration on webmin, but the database function NOW() is still using the default timezone.
How can I change the database timezone?
PS: I run mysql command to change timezone on webmin, but it gave me the error: Failed to execute SQL : SQL SET time_zone = 'America/New_York'; failed : Unknown or incorrect time zone: 'America/New_York'
© Server Fault or respective owner