note 104493 deleted from timezones.asia by derick

From: Date: Wed, 18 Sep 2013 10:45:59 +0000
Subject: note 104493 deleted from timezones.asia by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196293@lists.php.net to get a copy of this message
Note Submitter: khalidco at bigfoot dot com ---- Even though php supports 'Asia/Riyadh', MySQL doesn't! I had to use '+3:00' instead, to over come that since it's pointless to set the time zone for the script and not the database activities. To do it for both, do the following : <?php $timezone = "Asia/Riyadh"; if(function_exists('date_default_timezone_set')) date_default_timezone_set($timezone); mysql_query("SET SESSION time_zone = '+3:00'"); ?>

« previous php.notes (#196293) next »