note 42158 deleted from function.date by tularis

From: Date: Sun, 30 Jan 2005 14:47:03 +0000
Subject: note 42158 deleted from function.date by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84234@lists.php.net to get a copy of this message
Note Submitter: Chris Finke <chris at efinke dot com> ---- When using date("r"), be aware that on single-digit days of the month, an extra space is inserted to hold the place of the leading zero. I spent a while scratching my head over this one. On January 6, date("r") will return Tue, 6 Jan 2004 22:26:00 -0600 (note the two spaces between "Tue," and "6") but on January 10, date("r") will return Sat, 10 Jan 2004 22:26:00 -0600 So if you do something like explode(" ",date("r")); on January 6, you'll get Array ( [0] => Tues, [1] => [2] => 6 [3] => Jan [4] => 2004 [5] => 22:26:00 [6] => -0600 ) Although it might seem like a bug, it's not. See this bug report <http://bugs.php.net/bug.php?id=26822> for the official information. Chris Finke Toby Web Mail: http://toby.sourceforge.net/

« previous php.notes (#84234) next »