I tried below code
date_default_timezone_set('America/Los_Angeles');
$ok = inputs("SET timezone = 'America/Los_Angeles'");
$ok = inputs("INSERT INTO `table` (`date`) VALUES ( CURRENT_TIMESTAMP); ");
CURRENT_TIMESTAMP is still printing my server time.It is ignoring the timezone I set.Can some one tell me where I am wrong? thank you.
Set time zone of MySQL
SET GLOBAL time_zone = '+8:00'; //Your timezone
SET GLOBAL time_zone = 'America/Los_Angeles';//Your timezone name
SET @@global.time_zone='+00:00';//Your timezone
For check current timezone :-
SELECT @@global.time_zone;
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments