note 45112 deleted from function.date by aidan

From: Date: Thu, 26 Aug 2004 22:40:25 +0000
Subject: note 45112 deleted from function.date by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-75380@lists.php.net to get a copy of this message
Note Submitter: burden123 at rogers dot com ---- 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; }

« previous php.notes (#75380) next »