How do I make MySQL’s NOW() and CURDATE() functions use UTC?

Finally found what I was looking for…

In my.cnf,

[mysqld_safe]
timezone = UTC

I was putting this option under [mysqld], and mysql was failing to start.

Calling “SET time_zone=”+0:00″;” on every page load would also work, but I don’t like the idea of calling that query on every single page load.

Leave a Comment

error code: 521