Synch'ing Mysql's Time With Php

Folks, on one system a db-stored datetime value SELECTed with a

UNIX_TIMESTAMP() function returns a date that off by what looks like a

UTC difference (5 hours). Which is confirmed in MySQL’s description

of what that function returns.

But on another system, the returned date is correct. Which leads me

to believe that there’s a MySQL setting difference between the two


I’ve been all over the MySQL manual on this, and frankly, I’m

bewildered by all of the options.

I wonder if someone here can shed light on what I need to do to get

time synch?


Hi rajanrufus

One way to do it, is to find the difference of time of the two systems and add this to the UNIX_TIMESTAMP() in your sql conditions