note 79294 added to function.date
| From: | redcore at gmail dot com | Date: | Tue, 20 Nov 2007 01:24:51 +0000 |
| Subject: | note 79294 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132416@lists.php.net to get a copy of this message | ||
For those of us who don't have 5.x installed (that puts a colon in the time zone)...
<?php
$timezone = date("O"); // get timezone
$timezone_end = substr($timezone, -2, 2); // get last two numbers
$timezone= substr($timezone, 0, -2); // get first half
echo $timezone = $timezone . ":" . $timezone_end; // add colon
?>
----
Server IP: 69.147.83.197
Probable Submitter: 71.154.139.61
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/79294
Del: integrated -- https://master.php.net/note/delete/79294/integrated
Del: useless -- https://master.php.net/note/delete/79294/useless
Del: bad code -- https://master.php.net/note/delete/79294/bad+code
Del: spam -- https://master.php.net/note/delete/79294/spam
Del: non-english -- https://master.php.net/note/delete/79294/non-english
Del: in docs -- https://master.php.net/note/delete/79294/in+docs
Del: other reasons-- https://master.php.net/note/delete/79294
Reject -- https://master.php.net/note/reject/79294
Search -- https://master.php.net/manage/user-notes.php