Reputation: 10146
Im using php to set the current timezone for a site:
date_default_timezone_set('America/New_York');
How could I, at the same time, set the same time zone for mysql so that when I use NOW() it uses the timezone set in php?
Upvotes: 0
Views: 152
Reputation: 5847
You can change your Mysql timezone using SET time_zone = timezone;
http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html
Upvotes: 1
Reputation: 2635
Don't.
The best practice is to store UTC
in the database.
Upvotes: 3