MySQL Forums :: PHP :: PHP and MySQL time not same


Advanced Search

PHP and MySQL time not same
Posted by: Nirmal Natarajan ()
Date: September 10, 2009 07:31PM

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:
$db->Execute('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!

Options: ReplyQuote


Subject Written By Posted
PHP and MySQL time not same Nirmal Natarajan 09/10/2009 07:31PM
Re: PHP and MySQL time not same Nirmal Natarajan 09/11/2009 12:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.