Reputation: 3100
I am trying to set the timezone on my mysql server In my my.cnf file I have:
default-time-zone = '-05:00'
When I run SELECT NOW( )
in mysql I get 2015-02-05 04:13:57
Note: It should have returned '2015-02-05 10:13:15'
I want to set it so it has the Eastern time zone.
I ran the query: SELECT @ @global.time_zone , @ @session.time_zone
@@global.time_zone @@session.time_zone
SYSTEM SYSTEM
Upvotes: 2
Views: 4187
Reputation: 774
This should help you:
in the file "my.cnf" in the [mysqld] section
default_time_zone='+00:00'
TO SEE WHAT CURRENT TIME ZONE IS SET TO:
SELECT @@global.time_zone;
@@session.time_zone variable
SELECT @@session.time_zone;
TO SET THE TIME ZONE:
SET time_zone = 'Europe/Helsinki';
SET time_zone = "+00:00";
SET @@session.time_zone = "+00:00";
Upvotes: 4
Reputation: 55
SELECT NOW( )
function from mysql get your system time check your system time zone
Upvotes: 0