note 104493 added to timezones.asia
| From: | khalidco at bigfoot dot com | Date: | Fri, 17 Jun 2011 21:15:19 +0000 |
| Subject: | note 104493 added to timezones.asia | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-180651@lists.php.net to get a copy of this message | ||
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 :
$timezone = "Asia/Riyadh";
if(function_exists('date_default_timezone_set')) date_default_timezone_set($timezone);
mysql_query("SET SESSION time_zone = '+3:00'");
----
Server IP: 69.147.83.197
Probable Submitter: 94.99.30.223
----
Manual Page -- http://www.php.net/manual/en/timezones.asia.php
Edit -- https://master.php.net/note/edit/104493
Del: integrated -- https://master.php.net/note/delete/104493/integrated
Del: useless -- https://master.php.net/note/delete/104493/useless
Del: bad code -- https://master.php.net/note/delete/104493/bad+code
Del: spam -- https://master.php.net/note/delete/104493/spam
Del: non-english -- https://master.php.net/note/delete/104493/non-english
Del: in docs -- https://master.php.net/note/delete/104493/in+docs
Del: other reasons-- https://master.php.net/note/delete/104493
Reject -- https://master.php.net/note/reject/104493
Search -- https://master.php.net/manage/user-notes.php