note 45114 added to function.date
| From: | burden123 at rogers dot com | Date: | Thu, 26 Aug 2004 13:59:18 +0000 |
| Subject: | note 45114 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-75336@lists.php.net to get a copy of this message | ||
more fixes for iso 8601, based on rakkis at rakkis dot net 's changes. This one fixes the
problem of two negative signs if your time zone was in the negatives (i got "--5:00").
Also, should have leading zeros for the hour and time zone values. After spending a few on this one,
that PHP 5 function is looking attractive ^_^ :
function iso8601_date($time) {
$tzd = date('O',$time);
$tzd = substr(chunk_split($tzd, 3, ':'),0,6);
$date = date('Y-m-d\TH:i:s', $time) . $tzd;
return $date;
}
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45114
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45114&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45114&report=yes
Search -- http://master.php.net/manage/user-notes.php