views:

102

answers:

1

I run PHP and MySQL on the same machine, but both report different times.

I set the timezones by the following methods:

PHP:

date_default_timezone_set('Asia/Kuala_Lumpur');

MySQL:

SET time_zone = "Asia/Kuala_Lumpur";

The difference between two times is always exactly 24 seconds. Any idea why this is happening? I thought the times must be same because both reside on the same machine!

+1  A: 

see this question: http://stackoverflow.com/questions/987616/why-does-mysql-converttz-alter-the-seconds-after-timezone-adjustment

Craig
Thank you!That solved the issue.
Nirmal