|
|
 |
FN-FORUM: Getting GMT with MySQL NOW()
date posted 11th May 2008 17:07
Does anyone know how the MySQL NOW() function can be made to use GMT
instead of the server time? A site I am doing some work on has just been
moved onto a server in America. The environment varaible has been set in
PHP (putenv("TZ=Europe/London");) but in the SQL queries NOW() is
returning East coast of America time.
According to the manual, we need to set the system time zone for the
MySQL Server at startup. It gives two options: one is to set it with the
--timezone=timezone_name option to mysqld_safe.
The guy who is running the server doesn't seem very sure about this, and
anyway as it is not a dedicated server, I don't know if he will be able
to run the mysql demon.
Does anyone know of another (simpler) way of doing this?
Thanks,
Vicki
|
 |
|