mysql time problem

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

mysql time problem

Post by itsmani1 »

I am having time problem with mysql when i do:

Code: Select all

SELECT now() as now;
2008-09-09 05:02:30

But server time is : 15:26:40 2008

why is this? any help?

thank you
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: mysql time problem

Post by onion2k »

That's a bit weird. I could understand the number of hours being off because that could be due to the timezone setting, but for the minutes to be off as well... that's very odd. Is MySQL definitely on the same server as the webserver?
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Re: mysql time problem

Post by itsmani1 »

Sorry:
its like:
difference is only of hours.

I am having time problem with mysql when i do:

Code: Select all

SELECT now() as now;
2008-09-09 05:26:40

But server time is : 15:26:40 2008

on mysql console when i tried :

Code: Select all

select @@global.time_zone, @@session.time_zone;
It says: system

why is this? any help?

thank you
Post Reply