note 45112 added to function.date

From: Date: Thu, 26 Aug 2004 13:56:29 +0000
Subject: note 45112 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-75333@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 having 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+45112 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45112&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45112&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#75333) next »